]> piware.de Git - bin.git/commitdiff
workitems: fix bp links if they are already URLs
authormartin@piware.de <>
Fri, 20 Nov 2009 04:37:16 +0000 (22:37 -0600)
committermartin@piware.de <>
Fri, 20 Nov 2009 04:37:16 +0000 (22:37 -0600)
workitems.py

index 68554fe57a19779826f13486cd30be43670655bc..5cad66dea718fc9f82ac776b318de6a7ed2209eb 100755 (executable)
@@ -369,8 +369,12 @@ def html(db):
     completion.sort(key=lambda k: k[1], reverse=True)
 
     for (bp, percent) in completion:
-        print '  <tr><td><a href="%s/ubuntu/+spec/%s">%s</a></td> <td>%i/%i/%i</td> <td>%i%%</td> <td>%s</td></tr>' % (
-                blueprints_base_url, bp, bp, data[bp][0], data[bp][2],
+        if bp.startswith('http:'):
+            url = bp
+        else:
+            url = '%s/ubuntu/+spec/%s' % (blueprints_base_url, bp)
+        print '  <tr><td><a href="%s">%s</a></td> <td>%i/%i/%i</td> <td>%i%%</td> <td>%s</td></tr>' % (
+                url, bp, data[bp][0], data[bp][2],
                 data[bp][1], percent,
                 data[bp][-1])