mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
gs: fix test failures caused by .ls() (#5419)
This commit is contained in:
+4
-1
@@ -147,16 +147,19 @@ class GSTree(BaseTree):
|
||||
def ls(
|
||||
self, path_info, detail=False, recursive=False
|
||||
): # pylint: disable=arguments-differ
|
||||
import base64
|
||||
|
||||
assert recursive
|
||||
|
||||
for blob in self.gs.bucket(path_info.bucket).list_blobs(
|
||||
prefix=path_info.path
|
||||
):
|
||||
if detail:
|
||||
md5_hash = base64.b64decode(blob.md5_hash)
|
||||
yield {
|
||||
"type": "file",
|
||||
"name": blob.name,
|
||||
"md5": blob.md5_hash.encode().hex(),
|
||||
"md5": md5_hash.hex(),
|
||||
"size": blob.size,
|
||||
}
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user