mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-02 23:08:11 +08:00
Fix for s3 region name in data locator (#1316)
There is a small chicken and egg problem. The config file could be in s3, therefore when using the DataLocator to download the config file, we don't yet have an app_config object. Adding a check to handle this case.
This commit is contained in:
@@ -39,7 +39,7 @@ class DataLocator:
|
|||||||
self.cname = self.path if self.protocol == "file" else self.uri_or_path
|
self.cname = self.path if self.protocol == "file" else self.uri_or_path
|
||||||
|
|
||||||
# fsspec.filesystem will throw RuntimeError if the protocol is unsupported
|
# fsspec.filesystem will throw RuntimeError if the protocol is unsupported
|
||||||
if self.protocol == "s3" and app_config.data_locator__s3__region_name:
|
if self.protocol == "s3" and app_config and app_config.data_locator__s3__region_name:
|
||||||
self.fs = fsspec.filesystem(
|
self.fs = fsspec.filesystem(
|
||||||
self.protocol, config_kwargs={"region_name": app_config.data_locator__s3__region_name}
|
self.protocol, config_kwargs={"region_name": app_config.data_locator__s3__region_name}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user