Skip to content

Commit d9dce23

Browse files
fix endpoint initialization
1 parent fd400b7 commit d9dce23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mp_api/client/mprester.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ def __init__(
221221
"chemenv",
222222
]
223223

224+
if not self.endpoint.endswith("/"):
225+
self.endpoint += "/"
226+
224227
# Check if emmet version of server is compatible
225228
emmet_version = MPRester.get_emmet_version(self.endpoint)
226229

@@ -235,9 +238,6 @@ def __init__(
235238
if notify_db_version:
236239
raise NotImplementedError("This has not yet been implemented.")
237240

238-
if not self.endpoint.endswith("/"):
239-
self.endpoint += "/"
240-
241241
# Dynamically set rester attributes.
242242
# First, materials and molecules top level resters are set.
243243
# Nested rested are then setup to be loaded dynamically with custom __getattr__ functions.

0 commit comments

Comments
 (0)