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

Reboot - Use IndexError in exception #49488

Merged
merged 1 commit into from
Dec 4, 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
2 changes: 2 additions & 0 deletions changelogs/fragments/reboot-fix-exception-type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- reboot - use IndexError instead of TypeError in exception
2 changes: 1 addition & 1 deletion lib/ansible/plugins/action/reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def do_until_success_or_timeout(self, action, reboot_timeout, action_desc):
if action_desc:
try:
error = to_text(e).splitlines()[-1]
except TypeError as e:
except IndexError as e:
error = to_text(e)
display.debug("{0}: {1} fail '{2}', retrying in {3:.4} seconds...".format(self._task.action, action_desc,
error, fail_sleep))
Expand Down