Skip to content

Commit 31d739f

Browse files
committed
Remove any leading slashes when parsing the backend from an IMAS URI
Fixes IMAS-5560, where an URI of the form `imas://host:port/uda?....` would log `WARNING Backend /uda is unknown to IMASPy`
1 parent 54e5ce1 commit 31d739f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imaspy/backends/imas_core/db_entry_al.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def from_pulse_run(
136136
@classmethod
137137
def _from_uri(cls, uri: str, mode: int, factory: IDSFactory) -> "ALDBEntryImpl":
138138
"""Helper method to actually open/create the dataentry."""
139-
backend = urlparse(uri).path.lower()
139+
backend = urlparse(uri).path.lower().lstrip("/")
140140
cls._setup_backend(backend, mode, factory)
141141

142142
status, ctx = ll_interface.begin_dataentry_action(uri, mode)

0 commit comments

Comments
 (0)