hdfs: Fix _strip_protocol and _checksum

Match behavior previous to #6946
This commit is contained in:
David de la Iglesia Castro
2022-04-19 16:22:49 +03:00
committed by Ruslan Kuprieiev
parent f3a7ec7f48
commit 179e080c2f
+2 -2
View File
@@ -23,7 +23,7 @@ class HDFSFileSystem(FSSpecWrapper):
def _strip_protocol(cls, path: str) -> str:
from fsspec.utils import infer_storage_options
return infer_storage_options(path)["path"].lstrip("/")
return infer_storage_options(path)["path"]
def unstrip_protocol(self, path: str) -> str:
host = self.fs_args["host"]
@@ -60,7 +60,7 @@ class HDFSFileSystem(FSSpecWrapper):
result = self._run_command(
f"checksum {url}",
env=fix_env(os.environ),
user=self.fs_args["user"],
user=self.fs_args.get("user"),
)
if result is None:
return None