ElsevierDev / elsapy

A Python module for use with Elsevier's APIs: Scopus, ScienceDirect, others.
http://api.elsevier.com
BSD 3-Clause "New" or "Revised" License
366 stars 144 forks source link

Wrap reading and setting of `insttoken` into a try/except #44

Open philipptempel opened 4 years ago

philipptempel commented 4 years ago

According to the docs at create a config file and add your APIkey, if we don't have an insttoken, we should leave it out of the config file. However, the example program then fails as it tries to access key insttoken of the loaded json object.

This pull request fixes this by wrapping reading the insttoken value into a try/except block