From 9f7f455e48c307ec543e7c1e40cc4a48f47424d1 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 3 Sep 2019 17:20:36 -0700 Subject: last name/publisher cleanups --- chocula.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chocula.py b/chocula.py index 36a880d..04595da 100755 --- a/chocula.py +++ b/chocula.py @@ -1292,7 +1292,9 @@ class ChoculaDatabase(): for row in self.c.execute('SELECT * FROM journal WHERE valid_issnl = 1'): counts['total'] += 1 - name = row['name'].strip() + name = row['name'] + if name: + name = name.strip() if not row['name']: counts['empty-name'] += 1 @@ -1302,7 +1304,9 @@ class ChoculaDatabase(): counts['short-name'] += 1 continue - publisher = row['publisher'].strip() or None + publisher = row['publisher'] + if publisher: + publisher = publisher.strip() or None out = dict( issnl=row['issnl'], -- cgit v1.2.3