build/generic_programmer: catch 404 not found when downloading config/proxy.

This commit is contained in:
Florent Kermarrec 2020-05-05 12:16:29 +02:00
parent d0b8daa005
commit 9a7f9cb87b

View file

@ -47,6 +47,7 @@ class GenericProgrammer:
fullname = tools.cygpath(os.path.join(self.prog_local, self.flash_proxy_basename))
try:
r = requests.get(d + self.flash_proxy_basename)
if r.status_code != 404:
with open(fullname, "wb") as f:
f.write(r.content)
return fullname
@ -70,6 +71,7 @@ class GenericProgrammer:
fullname = tools.cygpath(os.path.join(self.prog_local, self.config))
try:
r = requests.get(d + self.config)
if r.status_code != 404:
with open(fullname, "wb") as f:
f.write(r.content)
return fullname