mirror of
				https://github.com/clearml/clearml
				synced 2025-06-26 18:16:07 +00:00 
			
		
		
		
	Fix StorageManager.list(“s3://..”, with_metadata=True) doesn't work
				
					
				
			This commit is contained in:
		
							parent
							
								
									035a76e282
								
							
						
					
					
						commit
						0b0fd55329
					
				| @ -611,6 +611,7 @@ class StorageHelper(object): | ||||
|         """ | ||||
|         if not obj: | ||||
|             return None | ||||
|         size = None | ||||
|         try: | ||||
|             if isinstance(self._driver, _HttpDriver) and obj: | ||||
|                 obj = self._driver._get_download_object(obj)  # noqa | ||||
| @ -1556,6 +1557,7 @@ class _Boto3Driver(_Driver): | ||||
|     @attrs | ||||
|     class ListResult(object): | ||||
|         name = attrib(default=None) | ||||
|         size = attrib(default=None) | ||||
| 
 | ||||
|     def __init__(self): | ||||
|         pass | ||||
| @ -1617,7 +1619,7 @@ class _Boto3Driver(_Driver): | ||||
|         else: | ||||
|             res = container.bucket.objects.all() | ||||
|         for res in res: | ||||
|             yield self.ListResult(name=res.key) | ||||
|             yield self.ListResult(name=res.key, size=res.size) | ||||
| 
 | ||||
|     def delete_object(self, object, **kwargs): | ||||
|         from botocore.exceptions import ClientError | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 allegroai
						allegroai