changeset 6235:1903d3813ac4

cleanup: don't "return x if x is not None else None"
author Søren Løvborg <sorenl@unity3d.com>
date Thu, 15 Sep 2016 18:08:54 +0200
parents e99a33d7d7f5
children 39a59e6915bb
files kallithea/lib/helpers.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/helpers.py	Thu Sep 15 17:22:56 2016 +0200
+++ b/kallithea/lib/helpers.py	Thu Sep 15 18:08:54 2016 +0200
@@ -487,9 +487,7 @@
     """Try to match email part of VCS committer string with a local user - or return None"""
     email = author_email(author)
     if email:
-        user = User.get_by_email(email, cache=True) # cache will only use sql_cache_short
-        if user is not None:
-            return user
+        return User.get_by_email(email, cache=True) # cache will only use sql_cache_short
     return None
 
 def email_or_none(author):