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])