]> git.decadent.org.uk Git - dak.git/commitdiff
dak queue-report: --822 outputs to stdout if no other location is given
authorAnsgar Burchardt <ansgar@debian.org>
Mon, 16 Jun 2014 17:34:29 +0000 (19:34 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Mon, 16 Jun 2014 17:36:00 +0000 (19:36 +0200)
dak/queue_report.py

index a7086d897a68c54ffc4232bc429c616eb72465e6..422672b7e99be6c9fa466a1fd7b22336ba4132b9 100755 (executable)
@@ -654,7 +654,10 @@ def main():
     f = None
     if Cnf.has_key("Queue-Report::Options::822"):
         # Open the report file
-        f = open(Cnf["Queue-Report::ReportLocations::822Location"], "w")
+        f = sys.stdout
+        filename822 = Cnf.get("Queue-Report::ReportLocations::822Location")
+        if filename822:
+            f = open(filename822, "w")
 
     session = DBConn().session()