Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Fix indent level in _exec_commands #34

Merged
merged 1 commit into from
Apr 3, 2017
Merged
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
10 changes: 5 additions & 5 deletions napalm_yang/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def _execute_methods(self, device, methods):
attr = device
for p in m["method"].split("."):
attr = getattr(attr, p)
r = attr(**m["args"])
r = attr(**m["args"])

if isinstance(r, dict) and all([isinstance(x, (str, unicode)) for x in r.values()]):
# Some vendors like junos return commands enclosed by a key
r = "\n".join(r.values())
if isinstance(r, dict) and all([isinstance(x, (str, unicode)) for x in r.values()]):
# Some vendors like junos return commands enclosed by a key
r = "\n".join(r.values())

result.append(r)
result.append(r)

return result

Expand Down