]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
parsemail: Be consistent in variable naming
authorStephen Finucane <stephen.finucane@intel.com>
Sun, 6 Mar 2016 01:41:08 +0000 (01:41 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 14 Apr 2016 16:29:15 +0000 (17:29 +0100)
Don't refer to a variable using different names in different
locations unless there's a good reason to do so.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
patchwork/bin/parsemail.py

index 3e2b9e83c40a3b9e5c4b00ba1b5212bb0f2ccfe0..16cd9d1b55691b65955f32005b735a8ae0441894 100755 (executable)
@@ -149,15 +149,14 @@ def find_author(mail):
     if name is not None:
         name = name.strip()
 
-    new_person = False
-
+    save_required = False
     try:
         person = Person.objects.get(email__iexact=email)
     except Person.DoesNotExist:
         person = Person(name=name, email=email)
-        new_person = True
+        save_required = True
 
-    return (person, new_person)
+    return person, save_required
 
 
 def find_date(mail):