Use the built-in .size method on gzip file

This commit is contained in:
Joseph Schorr 2014-09-26 12:25:28 -04:00
parent 76508218f4
commit d40b0975a7

View file

@ -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: