summaryrefslogtreecommitdiffstats
path: root/devel/utils.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-24 03:11:07 +0200
committerDan McGee <dan@archlinux.org>2011-06-24 03:11:07 +0200
commit82289ebb4432b3372b959430581afa0a2158acb9 (patch)
treeae28c0ff8f9a1d779c913ed641bde4ac084fef38 /devel/utils.py
parent9156003d2d93de57c663901c39ac66316a3d969e (diff)
downloadarchweb-82289ebb4432b3372b959430581afa0a2158acb9.tar.gz
archweb-82289ebb4432b3372b959430581afa0a2158acb9.tar.xz
Add a rematch_packager management command
This allows quick resolution of all unmatched packages, especially after tweaking the way find_user works. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/utils.py')
-rw-r--r--devel/utils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/devel/utils.py b/devel/utils.py
index 3a6ad69..6bc52c8 100644
--- a/devel/utils.py
+++ b/devel/utils.py
@@ -88,10 +88,12 @@ class UserFinder(object):
return None
if userstring in self.cache:
return self.cache[userstring]
- matches = re.match(r'^([^<]+)? ?<([^>]*)>', userstring)
+
+ name = email = None
+
+ matches = re.match(r'^([^<]+)? ?<([^>]*)>?', userstring)
if not matches:
- name = userstring
- email = None
+ name = userstring.strip()
else:
name = matches.group(1)
email = matches.group(2)