Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 727cfa4 commit 71ca3d7Copy full SHA for 71ca3d7
srtm/utils.py
@@ -19,7 +19,7 @@
19
import logging as mod_logging
20
import math as mod_math
21
import zipfile as mod_zipfile
22
-import cStringIO as mod_cstringio
+import io.BytesIO as mod_cstringio
23
24
ONE_DEGREE = 1000. * 10000.8 / 90.
25
@@ -56,7 +56,7 @@ def zip(contents, file_name):
56
57
def unzip(contents):
58
mod_logging.debug('Unzipping %s bytes' % len(contents))
59
- zip_file = mod_zipfile.ZipFile(mod_cstringio.StringIO(contents))
+ zip_file = mod_zipfile.ZipFile(mod_cstringio(contents))
60
zip_info_list = zip_file.infolist()
61
zip_info = zip_info_list[0]
62
result = zip_file.open(zip_info).read()
0 commit comments