mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 10:40:44 -06:00
refactor: delay urllib loading
This commit is contained in:
parent
19c39ad471
commit
3031e5fb7f
1 changed files with 4 additions and 3 deletions
|
@ -52,10 +52,8 @@ from typing import (
|
||||||
Type,
|
Type,
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
from urllib.error import HTTPError
|
|
||||||
from urllib.request import urlopen
|
|
||||||
|
|
||||||
__version__ = "23.8b1-4-g3bf000f-dev"
|
__version__ = "23.8b1-6-g19c39ad-dev"
|
||||||
|
|
||||||
|
|
||||||
class Spinner:
|
class Spinner:
|
||||||
|
@ -1120,6 +1118,9 @@ def resolve_deps(reqs: List[str], requirements: Path) -> List[str]:
|
||||||
|
|
||||||
|
|
||||||
def fetch_script(url: str) -> str:
|
def fetch_script(url: str) -> str:
|
||||||
|
from urllib.error import HTTPError # noqa
|
||||||
|
from urllib.request import urlopen # noqa
|
||||||
|
|
||||||
try:
|
try:
|
||||||
log.debug(f"fetching from remote url: {url}")
|
log.debug(f"fetching from remote url: {url}")
|
||||||
r = urlopen(url)
|
r = urlopen(url)
|
||||||
|
|
Loading…
Reference in a new issue