aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_tools/importers/datacite.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py
index e1a746c7..fb945ba6 100644
--- a/python/fatcat_tools/importers/datacite.py
+++ b/python/fatcat_tools/importers/datacite.py
@@ -335,11 +335,14 @@ class DataciteImporter(EntityImporter):
title, original_language_title, subtitle = parse_datacite_titles(
titles)
+ if title is None:
+ print('[{}] skipping record w/o title: {}'.format(doi, obj), file=sys.stderr)
+ return False
+
+ title = clean(title)
if not title:
print('[{}] skipping record w/o title: {}'.format(doi, obj), file=sys.stderr)
return False
- else:
- title = clean(title)
if not subtitle:
subtitle = None