Skip to content

Commit

Permalink
Avoid the Entrypoint overriding if its already registered (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
KeerthiYandaOS authored Oct 21, 2023
1 parent dbad63f commit ac290c8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fsspec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@ def process_entries():
specs = eps.select(group="fsspec.specs")
else:
specs = eps.get("fsspec.specs", [])
registered_names = {}
for spec in specs:
err_msg = f"Unable to load filesystem from {spec}"
name = spec.name
if name in registered_names:
continue
registered_names[name] = True
register_implementation(
spec.name,
name,
spec.value.replace(":", "."),
errtxt=err_msg,
# We take our implementations as the ones to overload with if
Expand Down

0 comments on commit ac290c8

Please sign in to comment.