summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/crossref.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-13 12:43:12 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-13 12:43:12 -0800
commite8a2925394f4cce0b8b4514f58d2bd19f9d7490b (patch)
treec060f01ac5e3e63d08a28cf38d0ade55267fc893 /python/fatcat_tools/importers/crossref.py
parent572fdc7caf74d9539e642e97855d8c8ba94ff93a (diff)
downloadfatcat-e8a2925394f4cce0b8b4514f58d2bd19f9d7490b.tar.gz
fatcat-e8a2925394f4cce0b8b4514f58d2bd19f9d7490b.zip
use Counter object instead of per-metric ints
Diffstat (limited to 'python/fatcat_tools/importers/crossref.py')
-rw-r--r--python/fatcat_tools/importers/crossref.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/crossref.py b/python/fatcat_tools/importers/crossref.py
index dddb58d1..01143551 100644
--- a/python/fatcat_tools/importers/crossref.py
+++ b/python/fatcat_tools/importers/crossref.py
@@ -247,7 +247,7 @@ class FatcatCrossrefImporter(FatcatImporter):
re.container_id = container.ident
self._issnl_id_map[ce.issnl] = container.ident
self.api.create_release(re, editgroup=editgroup)
- self.insert_count = self.insert_count + 1
+ self.counts['insert'] += 1
def create_batch(self, batch, editgroup=None):
"""Current work/release pairing disallows batch creation of releases.
@@ -269,4 +269,4 @@ class FatcatCrossrefImporter(FatcatImporter):
self._issnl_id_map[ce.issnl] = container.ident
release_batch.append(re)
self.api.create_release_batch(release_batch, autoaccept="true", editgroup=editgroup)
- self.insert_count = self.insert_count + len(release_batch)
+ self.counts['insert'] += len(release_batch)