Always read binary files with mode rb

This commit is contained in:
Tom Payne
2014-02-23 13:51:22 +01:00
parent 3aedca7bd6
commit 48b85316bb
2 changed files with 2 additions and 2 deletions

View File

@@ -153,7 +153,7 @@ PROJ4JS_ZIP_MD5 = '17caad64cf6ebc6e6fe62f292b134897'
def report_sizes(t):
stringio = StringIO()
gzipfile = gzip.GzipFile(t.name, 'w', 9, stringio)
with open(t.name) as f:
with open(t.name, 'rb') as f:
shutil.copyfileobj(f, gzipfile)
gzipfile.close()
rawsize = os.stat(t.name).st_size