File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,7 +227,6 @@ def guess_install_method() -> str:
227227 from pip ._internal .metadata import get_default_environment
228228 from pip ._internal .req .req_uninstall import uninstallation_paths
229229
230- try :
231230 dist = get_default_environment ().get_distribution (package_name )
232231 if dist :
233232 logging .debug ("Found %s dist" , dist )
@@ -236,10 +235,9 @@ def guess_install_method() -> str:
236235 else :
237236 logging .debug ("Skipping %s as it is not installed." , package_name )
238237 use_pip = False
239- except UninstallationError as exc :
240- logging .debug (exc )
241- use_pip = False
242- except ImportError :
238+ except (UninstallationError , AttributeError , ImportError ) as exc :
239+ # On Fedora 36, we got a AttributeError exception from pip that we want to avoid
240+ logging .debug (exc )
243241 use_pip = False
244242
245243 # We only want to recommend pip for upgrade if it looks safe to do so.
You can’t perform that action at this time.
0 commit comments