changeset 13:bfd7c8912d32

Use unsafe project name from Requirement to build VersionPredicate
author Cédric Krier <ced@b2ck.com>
date Mon, 23 Feb 2015 17:23:10 +0100
parents 1260a50b5d87
children b51310293ee3
files farmhouse.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/farmhouse.py	Mon Feb 23 17:22:20 2015 +0100
+++ b/farmhouse.py	Mon Feb 23 17:23:10 2015 +0100
@@ -71,9 +71,9 @@
             req, = parse_requirements(req)
         except ValueError:
             raise exception
-        req = '%s (%s)' % (
-            req.project_name, ','.join(''.join(s) for s in req.specs))
-        return VersionPredicate(req)
+        pred = '%s (%s)' % (
+            req.unsafe_name, ','.join(''.join(s) for s in req.specs))
+        return VersionPredicate(pred)
 
 
 @app.route('/atom')