mirror of https://github.com/commaai/tinygrad.git
ugh, corrupt downloads. when did this break?
This commit is contained in:
parent
9332fe1989
commit
ce0c80e1bd
|
@ -16,9 +16,11 @@ def fetch(url):
|
|||
with open(fp, "rb") as f:
|
||||
dat = f.read()
|
||||
else:
|
||||
with open(fp, "wb") as f:
|
||||
print("fetching %s" % url)
|
||||
with open(fp+".tmp", "wb") as f:
|
||||
dat = requests.get(url).content
|
||||
f.write(dat)
|
||||
os.rename(fp+".tmp", fp)
|
||||
return dat
|
||||
|
||||
def fetch_mnist():
|
||||
|
|
Loading…
Reference in New Issue