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

Update Expect.py #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions AristaLibrary/Expect.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def get_command_output(self, switch_id=None, cmd=None, version=1):
if isinstance(run_cmd, dict) or isinstance(run_cmd, list):
# Command is user specified. Send the command to the switch
# and store the result as a dictionary.
reply = self.arista_lib.enable(run_cmd, version=version)
reply = self.arista_lib.enable(run_cmd)
self.result[index] = reply[0]['result']
else:
# Command is a string. See if it matches a special case
Expand Down Expand Up @@ -856,13 +856,13 @@ def _contains_line(self, key, returned, match, msg=None):
[regex.search(line)] if m]
if not matches:
raise RuntimeError(
msg='{}Did not find \'{}\' in \'{}\''.format(AE_ERR, match,
msg or '{}Did not find \'{}\' in \'{}\''.format(AE_ERR, match,
key)
)
else:
# Not sure what type of return value we have
raise RuntimeError(
'{}Unable to determine type of return value'.format(AE_ERR)
msg or '{}Unable to determine type of return value'.format(AE_ERR)
)

def _to_contain_line(self, key, returned, match, msg=None):
Expand Down