[2.7] ios check_rc: Default to sending text of exception, not the whole exception (#47300)

* Default to sending text of exception, not the whole exception
(cherry picked from commit 6a866a5)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
pull/47651/head
Nathaniel Case 6 years ago committed by Toshio Kuratomi
parent be05dcdbfb
commit ffe80a14f6

@ -0,0 +1,3 @@
---
bugfixes:
- Fix issue getting output from failed ios commands when ``check_rc=False``

@ -291,7 +291,7 @@ class Cliconf(CliconfBase):
except AnsibleConnectionFailure as e: except AnsibleConnectionFailure as e:
if check_rc: if check_rc:
raise raise
out = getattr(e, 'err', e) out = getattr(e, 'err', to_text(e))
responses.append(out) responses.append(out)

Loading…
Cancel
Save