Bug 1341727 - Setup logging in ./mach taskgraph action-callback. r?dustin
authorJonas Finnemann Jensen <jopsen@gmail.com>
Thu, 23 Feb 2017 18:33:38 -0800
changeset 1049671 41d80879843f39bebda2a9abebac89d925296ca4
parent 1049670 85b8ef2ba305b6e8254349d856eec858fe8a3585
child 1049672 f1414f54c5e537bafff0c69858e2b59e9af76e83
push id172599
push userwlachance@mozilla.com
push dateFri, 24 Feb 2017 21:27:02 +0000
treeherdertry@f1414f54c5e5 [default view] [failures only]
reviewersdustin
bugs1341727
milestone54.0a1
Bug 1341727 - Setup logging in ./mach taskgraph action-callback. r?dustin MozReview-Commit-ID: LLSU87IofRh
taskcluster/mach_commands.py
--- a/taskcluster/mach_commands.py
+++ b/taskcluster/mach_commands.py
@@ -301,17 +301,22 @@ class MachCommands(MachCommandBase):
         except Exception:
             traceback.print_exc()
             sys.exit(1)
 
     @SubCommand('taskgraph', 'action-callback',
                 description='Run action callback used by action tasks')
     def action_callback(self, **options):
         import actions
-        actions.trigger_action_callback()
+        try:
+            self.setup_logging()
+            return actions.trigger_action_callback()
+        except Exception:
+            traceback.print_exc()
+            sys.exit(1)
 
     def setup_logging(self, quiet=False, verbose=True):
         """
         Set up Python logging for all loggers, sending results to stderr (so
         that command output can be redirected easily) and adding the typical
         mach timestamp.
         """
         # remove the old terminal handler