aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2020-05-22 16:18:53 -0700
committerGitHub <noreply@github.com>2020-05-22 16:18:53 -0700
commitcfc5d104e94a2f5d51878e33930e3ba83f0701c8 (patch)
tree344584225c2e5cb5aa9bf2d2881f0e3e7ed6c818 /python/fatcat_tools/importers
parente749b576bdb9bbec3bcef7e4e389e7fbbf916c84 (diff)
parent2e1b5b85c3b8f61ab5b0ebc55a880f0b742ca413 (diff)
downloadfatcat-cfc5d104e94a2f5d51878e33930e3ba83f0701c8.tar.gz
fatcat-cfc5d104e94a2f5d51878e33930e3ba83f0701c8.zip
Merge pull request #55 from cclauss/patch-1
Travis CI: Lint Python code for syntax errors and undefined names
Diffstat (limited to 'python/fatcat_tools/importers')
-rw-r--r--python/fatcat_tools/importers/jalc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/jalc.py b/python/fatcat_tools/importers/jalc.py
index c2adc0d6..e30bb233 100644
--- a/python/fatcat_tools/importers/jalc.py
+++ b/python/fatcat_tools/importers/jalc.py
@@ -201,11 +201,11 @@ class JalcImporter(EntityImporter):
date = record.date or None
if date:
date = date.string
- if len(date) is 10:
+ if len(date) == 10:
release_date = datetime.datetime.strptime(date['completed-date'], DATE_FMT).date()
release_year = release_date.year
release_date = release_date.isoformat()
- elif len(date) is 4 and date.isdigit():
+ elif len(date) == 4 and date.isdigit():
release_year = int(date)
pages = None