build/generic_programmer: move requests import to do it only when needed.
This commit is contained in:
parent
c9ab593989
commit
c0c5ae558a
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import requests
|
|
||||||
from litex.build import tools
|
from litex.build import tools
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ class GenericProgrammer:
|
||||||
if os.path.exists(fullname):
|
if os.path.exists(fullname):
|
||||||
return fullname
|
return fullname
|
||||||
# Search in repositories and download it
|
# Search in repositories and download it
|
||||||
|
import requests
|
||||||
os.makedirs(self.flash_proxy_local, exist_ok=True)
|
os.makedirs(self.flash_proxy_local, exist_ok=True)
|
||||||
for d in self.flash_proxy_repos:
|
for d in self.flash_proxy_repos:
|
||||||
fullname = tools.cygpath(os.path.join(self.flash_proxy_local, self.flash_proxy_basename))
|
fullname = tools.cygpath(os.path.join(self.flash_proxy_local, self.flash_proxy_basename))
|
||||||
|
|
Loading…
Reference in New Issue