[PATCH] UTIL: Update trove-id processing for hyphens

Daniel Silverstone daniel.silverstone at codethink.co.uk
Mon Jun 3 14:18:33 BST 2013


Ensure that trove-id meets the same requirements as repo aliases in terms of
naming.
---
 morphlib/util.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/morphlib/util.py b/morphlib/util.py
index b509f0b..6d7d5c4 100644
--- a/morphlib/util.py
+++ b/morphlib/util.py
@@ -107,8 +107,8 @@ def combine_aliases(app):  # pragma: no cover
     trove_host = app.settings['trove-host']
     trove_ids = app.settings['trove-id']
     repo_aliases = app.settings['repo-alias']
-    repo_pat = r'^(?P<prefix>[a-z0-9]+)=(?P<pull>[^#]+)#(?P<push>[^#]+)$'
-    trove_pat = (r'^(?P<prefix>[a-z0-9]+)=(?P<path>[^#]+)#'
+    repo_pat = r'^(?P<prefix>[a-z][a-z0-9-]+)=(?P<pull>[^#]+)#(?P<push>[^#]+)$'
+    trove_pat = (r'^(?P<prefix>[a-z][a-z0-9-]+)=(?P<path>[^#]+)#'
                  '(?P<pull>[^#]+)#(?P<push>[^#]+)$')
     alias_map = {}
     def _expand(protocol, path):
-- 
1.7.5.4




More information about the baserock-dev mailing list