From: Frank Lichtenheld Date: Fri, 30 Oct 2009 11:42:34 +0000 (+0000) Subject: process-upload: Change logging behaviour for --no-action X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94055d7573bf7542145cdeb5294e5d8cad611668;p=dak process-upload: Change logging behaviour for --no-action Log to stderr instead if not at all. Signed-off-by: Frank Lichtenheld --- diff --git a/dak/process_upload.py b/dak/process_upload.py index b37fbaee..24d297c3 100755 --- a/dak/process_upload.py +++ b/dak/process_upload.py @@ -228,12 +228,13 @@ def main(): utils.fubar("Couldn't obtain lock; assuming another 'dak process-upload' is already running.") else: raise - Logger = daklog.Logger(cnf, "process-upload") if cnf.get("Dir::UrgencyLog"): # Initialise UrgencyLog() log_urgency = True UrgencyLog() + Logger = daklog.Logger(cnf, "process-upload", Options["No-Action"]) + # Sort the .changes files so that we process sourceful ones first changes_files.sort(utils.changes_compare) @@ -252,9 +253,9 @@ def main(): Logger.log(["total", summarystats.accept_count, summarystats.accept_bytes]) if not Options["No-Action"]: - Logger.close() if log_urgency: UrgencyLog().close() + Logger.close() ###############################################################################