summaryrefslogtreecommitdiff
path: root/devel/utils.py
diff options
context:
space:
mode:
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 3a6ad699..6bc52c89 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)