Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchowes committed Aug 29, 2024
1 parent 4214a50 commit 25ef445
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cloudpathlib/s3/s3client.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,10 @@ def __init__(

def _get_metadata(self, cloud_path: S3Path) -> Dict[str, Any]:
# get accepts all download extra args
size = None
size = self._metadata_cache[cloud_path].size
size = None if not self._metadata_cache.get(cloud_path) else self._metadata_cache[cloud_path].size
if size:
return {
"last_modified": self._metadata_cache[cloud_path].lastmodified,
"last_modified": self._metadata_cache[cloud_path].last_modified,
"size": size,
"etag": self._metadata_cache[cloud_path].etag,
"content_type": None,
Expand Down

0 comments on commit 25ef445

Please sign in to comment.