From 5ecca7be5cd2caaddb61fbf2ca5caa108fbe29f2 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Mon, 3 Jun 2013 14:14:34 +0100 Subject: UTIL: Update trove-id processing for hyphens Ensure that trove-id meets the same requirements as repo aliases in terms of naming. --- morphlib/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'morphlib/util.py') diff --git a/morphlib/util.py b/morphlib/util.py index b509f0b0..6d7d5c4b 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[a-z0-9]+)=(?P[^#]+)#(?P[^#]+)$' - trove_pat = (r'^(?P[a-z0-9]+)=(?P[^#]+)#' + repo_pat = r'^(?P[a-z][a-z0-9-]+)=(?P[^#]+)#(?P[^#]+)$' + trove_pat = (r'^(?P[a-z][a-z0-9-]+)=(?P[^#]+)#' '(?P[^#]+)#(?P[^#]+)$') alias_map = {} def _expand(protocol, path): -- cgit v1.2.1