1
0

use portable flag on android instead of explicit path for headers file. use urllib.retrieve()

This commit is contained in:
thomasv
2012-12-17 17:51:52 +01:00
parent 6b7ad42ec5
commit 72b4ac97d0
2 changed files with 4 additions and 8 deletions

View File

@@ -296,15 +296,11 @@ class WalletVerifier(threading.Thread):
filename = self.path()
if os.path.exists(filename):
return
import urllib2
try:
import urllib
print_error("downloading ", self.headers_url )
f = urllib2.urlopen(self.headers_url)
s = f.read()
f.close()
f = open(filename,'wb+')
f.write(s)
f.close()
urllib.urlretrieve(self.headers_url, filename)
except:
print_error( "download failed. creating file", filename )
open(filename,'wb+').close()