summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/issn.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/issn.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/issn.py')
-rw-r--r--python/fatcat_tools/importers/issn.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/issn.py b/python/fatcat_tools/importers/issn.py
index d7fb9082..ba8492c6 100644
--- a/python/fatcat_tools/importers/issn.py
+++ b/python/fatcat_tools/importers/issn.py
@@ -61,7 +61,7 @@ class FatcatIssnImporter(FatcatImporter):
ce = self.parse_issn_row(row)
if ce is not None:
self.api.create_container(ce, editgroup=editgroup)
- self.insert_count = self.insert_count + 1
+ self.counts['insert'] += 1
def create_batch(self, batch, editgroup=None):
"""Reads and processes in batches (not API-call-per-line)"""
@@ -69,4 +69,4 @@ class FatcatIssnImporter(FatcatImporter):
for l in batch if l != None]
objects = [o for o in objects if o != None]
self.api.create_container_batch(objects, autoaccept="true", editgroup=editgroup)
- self.insert_count = self.insert_count + len(objects)
+ self.counts['insert'] += len(objects)