Skip to content

Commit ce5ae91

Browse files
authored
Remove trailing slash from endpoint if it exists (#107)
1 parent ddeda56 commit ce5ae91

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

h5pyd/_hl/files.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ def __init__(
212212
elif "hs_endpoint" in cfg:
213213
endpoint = cfg["hs_endpoint"]
214214

215+
# remove the trailing slash on endpoint if it exists
216+
if endpoint.endswith('/'):
217+
endpoint = endpoint.strip('/')
218+
215219
if username is None:
216220
if "H5SERV_USERNAME" in os.environ:
217221
username = os.environ["H5SERV_USERNAME"]

0 commit comments

Comments
 (0)