Skip to content

Commit

Permalink
Update MPRester to warn if a non-standard endpoint is used
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhorton authored Mar 26, 2019
1 parent 1da439a commit 3c52f53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pymatgen/ext/matproj.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def __init__(self, api_key=None, endpoint=None):
else:
self.preamble = SETTINGS.get("PMG_MAPI_ENDPOINT",
"https://materialsproject.org/rest/v2")

if self.preamble != "https://materialsproject.org/rest/v2":
warnings.warn("Non-default endpoint used: {}".format(self.preamble))

import requests
if sys.version_info[0] < 3:
try:
Expand Down

0 comments on commit 3c52f53

Please sign in to comment.