[PATCH v2 08/11] parsemail: Be consistent in variable naming

Stephen Finucane stephen.finucane at intel.com
Sat Apr 2 01:57:44 AEDT 2016


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 at intel.com>
---
 patchwork/bin/parsemail.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py
index 3e2b9e8..16cd9d1 100755
--- a/patchwork/bin/parsemail.py
+++ b/patchwork/bin/parsemail.py
@@ -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):
-- 
2.0.0



More information about the Patchwork mailing list