summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools
diff options
context:
space:
mode:
authorChristian Clauss <cclauss@me.com>2020-05-14 00:07:17 +0200
committerGitHub <noreply@github.com>2020-05-14 00:07:17 +0200
commit00a741f9268988eb0afa62099cd404f1a1d0777f (patch)
treeb763b14d8efbe1355fa851d80e068ab19a15a4cb /python/fatcat_tools
parent938209d5a6011066a23f3ca9f1c85beeb8b400a6 (diff)
downloadfatcat-00a741f9268988eb0afa62099cd404f1a1d0777f.tar.gz
fatcat-00a741f9268988eb0afa62099cd404f1a1d0777f.zip
Indentity is not the same this as equality in Python
Diffstat (limited to 'python/fatcat_tools')
-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