From c9003740b8de1f253885af277fd05aab4fcbb174 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 30 Jun 2017 13:15:44 -0700 Subject: [PATCH] Fix exception handler in command module Change-Id: Ie7f860e25a533620b263d3f1f7f127605991fa11 --- zuul/ansible/library/command.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zuul/ansible/library/command.py b/zuul/ansible/library/command.py index 99392cc739..c8b4511ba1 100644 --- a/zuul/ansible/library/command.py +++ b/zuul/ansible/library/command.py @@ -396,6 +396,7 @@ def zuul_run_command(self, args, zuul_log_id, check_rc=False, close_fds=True, ex self.log("Error Executing CMD:%s Exception:%s" % (clean_args, to_native(e))) self.fail_json(rc=e.errno, msg=to_native(e), cmd=clean_args) except Exception: + e = get_exception() self.log("Error Executing CMD:%s Exception:%s" % (clean_args, to_native(traceback.format_exc()))) self.fail_json(rc=257, msg=to_native(e), exception=traceback.format_exc(), cmd=clean_args)