litex_setup: move requests import to avoid having to install it on travis.
This commit is contained in:
parent
9854fdd5f4
commit
d71152ef66
|
@ -7,7 +7,6 @@ import shutil
|
||||||
import hashlib
|
import hashlib
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
import requests
|
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
current_path = os.path.abspath(os.curdir)
|
current_path = os.path.abspath(os.curdir)
|
||||||
|
@ -106,6 +105,7 @@ litex_setup_url = "https://raw.githubusercontent.com/enjoy-digital/litex/master/
|
||||||
current_sha1 = hashlib.sha1(open(os.path.realpath(__file__)).read().encode("utf-8")).hexdigest()
|
current_sha1 = hashlib.sha1(open(os.path.realpath(__file__)).read().encode("utf-8")).hexdigest()
|
||||||
print("[checking litex_setup.py]...")
|
print("[checking litex_setup.py]...")
|
||||||
try:
|
try:
|
||||||
|
import requests
|
||||||
r = requests.get(litex_setup_url)
|
r = requests.get(litex_setup_url)
|
||||||
if r.status_code != 404:
|
if r.status_code != 404:
|
||||||
upstream_sha1 = hashlib.sha1(r.content).hexdigest()
|
upstream_sha1 = hashlib.sha1(r.content).hexdigest()
|
||||||
|
|
Loading…
Reference in New Issue