File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 55from pathlib import Path
66from urllib import parse
77from urllib import request
8+ from urllib .error import URLError
89
910import typing
1011
@@ -125,16 +126,19 @@ def resolve_dependencies(
125126 "it does not exist. Empty file assumed."
126127 )
127128 else :
128- with request .urlopen (file_or_url ) as fio :
129- process_io (
130- fio ,
131- requirements ,
132- constraints ,
133- package_keys ,
134- override_keys ,
135- ignore_keys ,
136- variety ,
137- )
129+ try :
130+ with request .urlopen (file_or_url ) as fio :
131+ process_io (
132+ fio ,
133+ requirements ,
134+ constraints ,
135+ package_keys ,
136+ override_keys ,
137+ ignore_keys ,
138+ variety ,
139+ )
140+ except URLError as e :
141+ raise Exception (f"Failed to fetch '{ file_or_url } ': { e } " )
138142
139143 if requirements and variety == "r" :
140144 requirements = (
You can’t perform that action at this time.
0 commit comments