mirror of
https://github.com/J3rome/py-requirements-guesser.git
synced 2024-11-22 01:45:15 +01:00
* Error handling
This commit is contained in:
parent
ec85ef96ce
commit
a31bd52e03
5
utils.py
5
utils.py
@ -63,8 +63,13 @@ def get_mapping_files_from_pipreqs(tmp_path="/tmp/.py-req-guesser"):
|
||||
mapping_url = "https://raw.githubusercontent.com/bndr/pipreqs/90102acdbb23c09574d27df8bd1f568d34e0cfd3/pipreqs/mapping"
|
||||
stdlib_url = "https://raw.githubusercontent.com/bndr/pipreqs/90102acdbb23c09574d27df8bd1f568d34e0cfd3/pipreqs/stdlib"
|
||||
|
||||
try:
|
||||
urlretrieve(mapping_url, mapping_filepath)
|
||||
urlretrieve(stdlib_url, stdlib_filepath)
|
||||
except:
|
||||
print("[ERROR] Internet access is required to fetch mapping files from https://github.com/bndr/pipreqs")
|
||||
exit(1)
|
||||
|
||||
|
||||
from_import_to_package_mapping = {}
|
||||
from_package_to_import_mapping = {}
|
||||
|
Loading…
Reference in New Issue
Block a user