Skip to content

Commit

Permalink
Attempt to cope with RTFD.io
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-E-Rose committed Jan 1, 2022
1 parent 8b3bfab commit 039774c
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions pybliometrics/scopus/utils/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
from pybliometrics.scopus.utils.constants import CONFIG_FILE, RATELIMITS
from pybliometrics.scopus.utils.create_config import create_config

# Read/create config file
if not CONFIG_FILE.exists():
config = create_config()
else:
config = configparser.ConfigParser()
config.optionxform = str
config.read(CONFIG_FILE)

# Parse keys with fixture for RTFD.io
# Read/create config file (with fixture for RTFD.io)
try:
if not CONFIG_FILE.exists():
config = create_config()
else:
config = configparser.ConfigParser()
config.optionxform = str
config.read(CONFIG_FILE)
KEYS = [k.strip() for k in config.get('Authentication', 'APIKey').split(",")]
except configparser.NoSectionError:
except (configparser.NoSectionError, EOFError):
pass

# Throttling params
Expand Down

0 comments on commit 039774c

Please sign in to comment.