summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/chocula.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-09-05 18:49:36 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-09-05 18:49:36 -0700
commit28d2d94a9100c1a809955cde93fdbb7a36263057 (patch)
treeb61675cbd21f28da15dabf4361cf86bad565f1c4 /python/fatcat_tools/importers/chocula.py
parent070069cb6eb71b92a9c4e46f3d4cfabb67f4eb3f (diff)
downloadfatcat-28d2d94a9100c1a809955cde93fdbb7a36263057.tar.gz
fatcat-28d2d94a9100c1a809955cde93fdbb7a36263057.zip
refactor all python source for client lib name
Diffstat (limited to 'python/fatcat_tools/importers/chocula.py')
-rw-r--r--python/fatcat_tools/importers/chocula.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/fatcat_tools/importers/chocula.py b/python/fatcat_tools/importers/chocula.py
index d7044ff4..6915ba98 100644
--- a/python/fatcat_tools/importers/chocula.py
+++ b/python/fatcat_tools/importers/chocula.py
@@ -2,7 +2,7 @@
import sys
import json
import itertools
-import fatcat_client
+import fatcat_openapi_client
from .common import EntityImporter, clean
@@ -66,7 +66,7 @@ class ChoculaImporter(EntityImporter):
elif 'journal ' in name.lower():
container_type = 'journal'
- ce = fatcat_client.ContainerEntity(
+ ce = fatcat_openapi_client.ContainerEntity(
issnl=row['issnl'],
ident=row['ident'],
name=name,
@@ -82,7 +82,7 @@ class ChoculaImporter(EntityImporter):
if ce.ident:
try:
existing = self.api.get_container(ce.ident)
- except fatcat_client.rest.ApiException as err:
+ except fatcat_openapi_client.rest.ApiException as err:
if err.status != 404:
raise err
self.counts['exists'] += 1
@@ -97,7 +97,7 @@ class ChoculaImporter(EntityImporter):
# check if existing by ISSN-L
try:
existing = self.api.lookup_container(issnl=ce.issnl)
- except fatcat_client.rest.ApiException as err:
+ except fatcat_openapi_client.rest.ApiException as err:
if err.status != 404:
raise err
if existing:
@@ -157,8 +157,8 @@ class ChoculaImporter(EntityImporter):
raise NotImplementedError
def insert_batch(self, batch):
- self.api.create_container_auto_batch(fatcat_client.ContainerAutoBatch(
- editgroup=fatcat_client.Editgroup(
+ self.api.create_container_auto_batch(fatcat_openapi_client.ContainerAutoBatch(
+ editgroup=fatcat_openapi_client.Editgroup(
description=self.editgroup_description,
extra=self.editgroup_extra),
entity_list=batch))