[PATCH 11/13] parsemail: Be consistent in variable naming
Stephen Finucane
stephen.finucane at intel.com
Fri Mar 11 23:08:15 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 2a5200d..484f92e 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