Skip to content

Commit

Permalink
build-log: fix timestamp loging
Browse files Browse the repository at this point in the history
Default value for keyword argument is calculate at function definition
time, not a call time. So the previous version basically logged script
start time.

QubesOS/qubes-issues#2023
  • Loading branch information
marmarek committed Dec 18, 2016
1 parent 910a7db commit 03e412e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rpc-services/qubesbuilder.BuildLog
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ if not qrexec_remote:
sys.exit(1)


def log(msg, remote=True, now=datetime.utcnow()):
def log(msg, remote=True, now=None):
if now is None:
now = datetime.utcnow()
if remote:
remote_str = '{}:'.format(qrexec_remote)
else:
Expand Down

0 comments on commit 03e412e

Please sign in to comment.