Skip to content

Commit

Permalink
Use .get for LastModified to mitigate KeyError (#828)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Durant <[email protected]>
  • Loading branch information
pypeaday and martindurant authored Nov 29, 2023
1 parent 9494426 commit 8d9ab49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion s3fs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ async def _info(self, path, bucket=None, key=None, refresh=False, version_id=Non
)
return {
"ETag": out.get("ETag", ""),
"LastModified": out["LastModified"],
"LastModified": out.get("LastModified", ""),
"size": out["ContentLength"],
"name": "/".join([bucket, key]),
"type": "file",
Expand Down

0 comments on commit 8d9ab49

Please sign in to comment.