Use the built-in .size method on gzip file
This commit is contained in:
parent
76508218f4
commit
d40b0975a7
1 changed files with 2 additions and 2 deletions
|
@ -79,8 +79,8 @@ def backfill_sizes_from_data():
|
|||
try:
|
||||
layer_stream = StringIO(layer_data)
|
||||
with GzipFile(fileobj=layer_stream, mode='rb') as gzip_file:
|
||||
layer_size = len(gzip_file.read())
|
||||
logger.debug('%s' % gzip_file.size)
|
||||
gzip_file.read()
|
||||
layer_size = gzip_file.size
|
||||
|
||||
layer_stream.close()
|
||||
except Exception as ex:
|
||||
|
|
Reference in a new issue