Skip to content

Commit ac290c8

Browse files
Avoid the Entrypoint overriding if its already registered (#1389)
1 parent dbad63f commit ac290c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fsspec/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ def process_entries():
4848
specs = eps.select(group="fsspec.specs")
4949
else:
5050
specs = eps.get("fsspec.specs", [])
51+
registered_names = {}
5152
for spec in specs:
5253
err_msg = f"Unable to load filesystem from {spec}"
54+
name = spec.name
55+
if name in registered_names:
56+
continue
57+
registered_names[name] = True
5358
register_implementation(
54-
spec.name,
59+
name,
5560
spec.value.replace(":", "."),
5661
errtxt=err_msg,
5762
# We take our implementations as the ones to overload with if

0 commit comments

Comments
 (0)