diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 378: do not put the LAVA access token into the log file

Message ID 20120830210612.21316.82585.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson Aug. 30, 2012, 9:06 p.m. UTC
Merge authors:
  Michael Hudson-Doyle (mwhudson)
Related merge proposals:
  https://code.launchpad.net/~mwhudson/lava-dispatcher/dont-show-token-bug-1042138/+merge/121983
  proposed by: Michael Hudson-Doyle (mwhudson)
  review: Approve - Andy Doan (doanac)
------------------------------------------------------------
revno: 378 [merge]
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Fri 2012-08-31 09:05:07 +1200
message:
  do not put the LAVA access token into the log file
modified:
  lava_dispatcher/job.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/job.py'
--- lava_dispatcher/job.py	2012-06-13 07:35:23 +0000
+++ lava_dispatcher/job.py	2012-08-30 04:22:50 +0000
@@ -228,8 +228,11 @@ 
                 params = submit_results.get('parameters', {})
                 action = lava_commands[submit_results['command']](
                     self.context)
+                params_for_display = params.copy()
+                if 'token' in params_for_display:
+                    params_for_display['token'] = '<HIDDEN>'
                 try:
-                    logging.info("Submitting the test result with parameters = %s", params)
+                    logging.info("Submitting the test result with parameters = %s", params_for_display)
                     action.run(**params)
                 except Exception as err:
                     logging.error("Failed to submit the test result. Error = %s", err)