Skip to content

Commit ad17934

Browse files
authored
Fix issue with get_file_size and S3 (#460)
1 parent 72639a4 commit ad17934

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gramps_webapi/api/s3.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ def file_exists(self) -> bool:
121121

122122
def get_file_size(self) -> int:
123123
"""Return the file size in bytes."""
124-
self.client.head_object(Bucket=self.bucket_name, Key=self.object_name)
125-
response = self.client.head_object(Bucket=self.bucket_name, Key=key)
124+
response = self.client.head_object(
125+
Bucket=self.bucket_name, Key=self.object_name
126+
)
126127
file_size = response["ContentLength"]
127128
return file_size
128129

0 commit comments

Comments
 (0)