Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsnap2py indentation fix #416

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/jnpr/jsnapy/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,15 @@ def exists(
% (element, x_path, count_pass, count_fail)
)
self._print_result(msg, res)
tresult['err'] = err_mssg
elif res is True:
msg = 'All "%s" exists at xpath "%s" [ %d value matched ]' % (
element,
x_path,
count_pass,
)
self._print_result(msg, res)
tresult['info'] = info_mssg

# tresult['info'] = info_mssg
# tresult['err'] = err_mssg
Expand Down
4 changes: 2 additions & 2 deletions tools/jsnap2py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def msg_change(x):
data = (data[0],data[1][1:])
if data[0] in ['id', 'ID']:
data = (data[0], int(data[1])-1)
msg = "{{%s_%s}}" % (data)
msg = "{{%s_%s}}" % (data)
elif data[0] in ['PRE', 'POST']:
msg = '{{%s["%s"]}}' % (data)
else:
Expand Down Expand Up @@ -120,7 +120,7 @@ else:
'\$id\.\d|\$pre\s?/?\.?/\s?[\w-]+/?[\w-]*|\$post\s?/?\.?/\s?[\w-]+/?[\w-]*|,\s?\.{0,2}/?\.{0,2}/?[\w-]+/?[\w-]*/?[\w-]*',
data.group(2),
re.I)
inputs = map(msg_change, inputs)
inputs = list(map(msg_change, inputs))
to_format = re.search('"(.*?)"', obj.group(2))
if len(inputs) > 0:
if to_format:
Expand Down
Loading