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.
2 parents eeb4a87 + b9d67c9 commit 7a5e558Copy full SHA for 7a5e558
mbed/mbed.py
@@ -29,7 +29,7 @@
29
import errno
30
from itertools import chain, izip, repeat
31
from urlparse import urlparse
32
-import urllib
+import urllib2
33
import zipfile
34
import argparse
35
@@ -281,7 +281,10 @@ def fetch_rev(url, rev):
281
try:
282
if not os.path.exists(tmp_file):
283
action("Downloading mbed library build \"%s\" (might take a minute)" % rev)
284
- urllib.urlretrieve(url, tmp_file)
+ outfd = open(tmp_file, 'wb')
285
+ inurl = urllib2.urlopen(url)
286
+ outfd.write(inurl.read())
287
+ outfd.close()
288
except:
289
if os.path.isfile(tmp_file):
290
os.remove(tmp_file)
@@ -2425,4 +2428,4 @@ def main():
2425
2428
2426
2429
2427
2430
if __name__ == "__main__":
- main()
2431
+ main()
0 commit comments