[Blends-commit] [SCM] website branch, master, updated. 819d5540e6be918d9db85ea32b533ac3e44c3d3f

Andreas Tille tille at debian.org
Fri Mar 6 10:25:43 UTC 2015


The following commit has been merged in the master branch:
commit 9c27f56da65a8c938a8402ff220a1ee7eb503dee
Author: Andreas Tille <tille at debian.org>
Date:   Fri Mar 6 09:15:46 2015 +0100

    Skip json output which was done for the only purpose if debugging

diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index e787187..40efda0 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -7,6 +7,8 @@ UDDPORT=5452
 PORT=UDDPORT
 DEFAULTPORT=5432
 
+debug=0
+
 from sys import argv, stderr, exit
 import os
 import psycopg2
@@ -359,17 +361,19 @@ the right shows the tasks of %s.""" ) \
         bugs_data[task]['weightedsev']   +=  ' (%i)' % bugs_data[task]['weighttask']
 
     # Debuging output in JSON file
-    f = open(blendname+'_bugs.json', 'w')
-    for task in bugs_data:
-        print >>f, "*** %s ***" % task
-        for status in STATES:
-            if bugs_data[task].has_key(status):
-                print >>f, status
-                print >>f, json.dumps(bugs_data[task][status])
-        print >>f
-    print >>f, json.dumps(bugs_data)
-    f.close()
-    SetFilePermissions(blendname+'_bugs.json')
+    if debug > 0:
+        f = open(blendname+'_bugs.json', 'w')
+        if debug > 1:
+            for task in bugs_data:
+                print >>f, "*** %s ***" % task
+                for status in STATES:
+                    if bugs_data[task].has_key(status):
+                        print >>f, status
+                        print >>f, json.dumps(bugs_data[task][status])
+                print >>f
+        print >>f, json.dumps(bugs_data)
+        f.close()
+        SetFilePermissions(blendname+'_bugs.json')
 
     nbugs           = {}
     ndone           = {}

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list