From c0c5ae558ace64d37741c135af0d5c7be05c23c8 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 16 Apr 2020 08:44:36 +0200 Subject: [PATCH] build/generic_programmer: move requests import to do it only when needed. --- litex/build/generic_programmer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litex/build/generic_programmer.py b/litex/build/generic_programmer.py index 2fb344443..394440300 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))