From 27743dd4dd446ee8db2d4ec59c8f66a522981c10 Mon Sep 17 00:00:00 2001 From: Alan Fregtman <941331+darkvertex@users.noreply.github.com> Date: Thu, 3 Mar 2022 18:21:45 -0500 Subject: [PATCH] Fix bad args on some traceback.format_exc() calls that break in Python3 and silently do nothing in Python2. (Fixes #84) --- src/shotgunEventDaemon.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/shotgunEventDaemon.py b/src/shotgunEventDaemon.py index 7915c5ab..8924b61d 100755 --- a/src/shotgunEventDaemon.py +++ b/src/shotgunEventDaemon.py @@ -369,7 +369,7 @@ def start(self): self.log.warning("Keyboard interrupt. Cleaning up...") except Exception as err: msg = "Crash!!!!! Unexpected error (%s) in main loop.\n\n%s" - self.log.critical(msg, type(err), traceback.format_exc(err)) + self.log.critical(msg, type(err), traceback.format_exc()) def _loadEventIdData(self): """ @@ -444,8 +444,7 @@ def _loadEventIdData(self): fh.close() except OSError as err: raise EventDaemonError( - "Could not load event id from file.\n\n%s" - % traceback.format_exc(err) + "Could not load event id from file.\n\n%s" % traceback.format_exc() ) else: # No id file? @@ -606,7 +605,7 @@ def _saveEventIdData(self): self.log.error( "Can not write event id data to %s.\n\n%s", eventIdFile, - traceback.format_exc(err), + traceback.format_exc(), ) break else: