1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Merge pull request #1331 from AlanCoding/show_me_your_exceptions

Always log uncaught task exceptions
This commit is contained in:
Alan Rominger 2018-04-11 14:26:09 -04:00 committed by GitHub
commit 7ad42161fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1000,9 +1000,9 @@ class BaseTask(Task):
) )
except Exception: except Exception:
if status != 'canceled': # run_pexpect does not throw exceptions for cancel or timeout
# this could catch programming or file system errors
tb = traceback.format_exc() tb = traceback.format_exc()
if settings.DEBUG:
logger.exception('%s Exception occurred while running task', instance.log_format) logger.exception('%s Exception occurred while running task', instance.log_format)
finally: finally:
try: try: