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

ios check_rc: Default to sending text of exception, not the whole exception #47300

Merged
merged 2 commits into from
Oct 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/47300-ios-check_rc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- Fix issue getting output from failed ios commands when ``check_rc=False``
2 changes: 1 addition & 1 deletion lib/ansible/plugins/cliconf/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def run_commands(self, commands=None, check_rc=True):
except AnsibleConnectionFailure as e:
if check_rc:
raise
out = getattr(e, 'err', e)
out = getattr(e, 'err', to_text(e))

responses.append(out)

Expand Down