Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71ca3d7

Browse files
Update utils.py
1 parent 727cfa4 commit 71ca3d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

srtm/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import logging as mod_logging
2020
import math as mod_math
2121
import zipfile as mod_zipfile
22-
import cStringIO as mod_cstringio
22+
import io.BytesIO as mod_cstringio
2323

2424
ONE_DEGREE = 1000. * 10000.8 / 90.
2525

@@ -56,7 +56,7 @@ def zip(contents, file_name):
5656

5757
def unzip(contents):
5858
mod_logging.debug('Unzipping %s bytes' % len(contents))
59-
zip_file = mod_zipfile.ZipFile(mod_cstringio.StringIO(contents))
59+
zip_file = mod_zipfile.ZipFile(mod_cstringio(contents))
6060
zip_info_list = zip_file.infolist()
6161
zip_info = zip_info_list[0]
6262
result = zip_file.open(zip_info).read()

0 commit comments

Comments
 (0)