From: Florent Kermarrec Date: Thu, 16 Apr 2020 06:44:36 +0000 (+0200) Subject: build/generic_programmer: move requests import to do it only when needed. X-Git-Tag: 24jan2021_ls180~454 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0c5ae558ace64d37741c135af0d5c7be05c23c8;p=litex.git build/generic_programmer: move requests import to do it only when needed. --- diff --git a/litex/build/generic_programmer.py b/litex/build/generic_programmer.py index 2fb34444..39444030 100644 --- a/litex/build/generic_programmer.py +++ b/litex/build/generic_programmer.py @@ -5,7 +5,7 @@ import os import sys -import requests + from litex.build import tools @@ -38,6 +38,7 @@ class GenericProgrammer: if os.path.exists(fullname): return fullname # Search in repositories and download it + import requests os.makedirs(self.flash_proxy_local, exist_ok=True) for d in self.flash_proxy_repos: fullname = tools.cygpath(os.path.join(self.flash_proxy_local, self.flash_proxy_basename))