Fix exception handler in command module

Change-Id: Ie7f860e25a533620b263d3f1f7f127605991fa11
This commit is contained in:
James E. Blair 2017-06-30 13:15:44 -07:00
parent e0c5f015e1
commit c9003740b8
1 changed files with 1 additions and 0 deletions

View File

@ -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)