From 28d2d94a9100c1a809955cde93fdbb7a36263057 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 5 Sep 2019 18:49:36 -0700 Subject: refactor all python source for client lib name --- python/fatcat_tools/importers/chocula.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'python/fatcat_tools/importers/chocula.py') 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)) -- cgit v1.2.3