From c498d1ada7e83c0ebec9fd0723565d085e2e3e4b Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Tue, 11 Mar 2025 10:19:09 +0100 Subject: [PATCH] Do not force err Otherwise, a KeyError is raised if err has not been defined --- fsspec/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsspec/registry.py b/fsspec/registry.py index 59be4db7b..05be65736 100644 --- a/fsspec/registry.py +++ b/fsspec/registry.py @@ -248,7 +248,7 @@ def get_filesystem_class(protocol): try: register_implementation(protocol, _import_class(bit["class"])) except ImportError as e: - raise ImportError(bit["err"]) from e + raise ImportError(bit.get("err")) from e cls = registry[protocol] if getattr(cls, "protocol", None) in ("abstract", None): cls.protocol = protocol