From d1862ea4a6dcb781713ffc54bdc4bd7d7cdbdb9e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 8 Jan 2019 14:35:46 -0800 Subject: start updating importer auth with crossref importer --- python/fatcat_tools/api_auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/fatcat_tools/api_auth.py') diff --git a/python/fatcat_tools/api_auth.py b/python/fatcat_tools/api_auth.py index b36d467c..c49051f6 100644 --- a/python/fatcat_tools/api_auth.py +++ b/python/fatcat_tools/api_auth.py @@ -1,5 +1,5 @@ -import sys +import os, sys import fatcat_client from fatcat_client.rest import ApiException @@ -23,7 +23,7 @@ def authenticated_api(host_uri, token=None): conf = fatcat_client.Configuration() conf.host = host_uri if not token: - token = sys.env['FATCAT_API_AUTH_TOKEN'] + token = os.environ['FATCAT_API_AUTH_TOKEN'] if not token: sys.stderr.write( 'This client requires a fatcat API token (eg, in env var FATCAT_API_AUTH_TOKEN)\n') @@ -34,7 +34,7 @@ def authenticated_api(host_uri, token=None): api = fatcat_client.DefaultApi(fatcat_client.ApiClient(conf)) # verify up front that auth is working - api.check_auth() + api.auth_check() return api -- cgit v1.2.3