changeset 4519:5f13634aa7be

helpers: fix crash on new users without email (Issue #28)
author Mads Kiilerich <madski@unity3d.com>
date Wed, 24 Sep 2014 14:24:40 +0200
parents 8cf1d694bda0
children bc2e030bff7f
files kallithea/lib/helpers.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/helpers.py	Wed Sep 24 14:24:40 2014 +0200
+++ b/kallithea/lib/helpers.py	Wed Sep 24 14:24:40 2014 +0200
@@ -496,6 +496,8 @@
 
 
 def email_or_none(author):
+    if not author:
+        return None
     # extract email from the commit string
     _email = email(author)
     if _email: