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

Andreas Tille tille at debian.org
Sun May 26 23:13:15 UTC 2013


The following commit has been merged in the master branch:
commit b699c99f70ee595c77f988ac3876c6d0ea2f672c
Author: Andreas Tille <tille at debian.org>
Date:   Sun May 26 23:37:10 2013 +0200

    Just create two separate JSON files containing the needed data for PTS

diff --git a/misc/pts/taskinfo-example.py b/misc/pts/taskinfo-example.py
index c245737..a0003f7 100755
--- a/misc/pts/taskinfo-example.py
+++ b/misc/pts/taskinfo-example.py
@@ -73,17 +73,19 @@ query = """SELECT d.blend, d.task, t.title, package, dependency, component FROM
              WHERE d.distribution = 'debian' AND m.distribution ilike 'Debian'"""
 _execute_udd_query(query)
 if curs.rowcount > 0:
-    data_in_json_format = json.dumps(RowDictionaries(curs))
-
-f = open('tasksdata.json', 'w')
-print >>f, data_in_json_format
-f.close()
+    f = open('tasksdata.json', 'w')
+    print >>f, json.dumps(RowDictionaries(curs))
+    f.close()
 
 query = "SELECT blend, outputdir FROM blends_metadata WHERE distribution ilike 'Debian'"
 _execute_udd_query(query)
 if curs.rowcount > 0:
+    output=[]
     for row in RowDictionaries(curs):
 	row['outputdir'] = re.sub('/var/lib/gforge/chroot/home/groups/([^/]+)/htdocs(.*)', \
 	                          'http://\\1.alioth.debian.org\\2/tasks/', \
 	                          row['outputdir'])
-	print row
+	output.append(row)
+    f = open('blendsurls.json', 'w')
+    print >>f, json.dumps(output)
+    f.close()

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list