Skip to content

Commit

Permalink
Fix pip version check (ansible#2641)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Nov 11, 2022
1 parent 0fef3eb commit 4f04991
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ansiblelint/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ def guess_install_method() -> str:
with warnings.catch_warnings(record=True):
warnings.simplefilter("always")
# pylint: disable=import-outside-toplevel
from pip._internal.exceptions import UninstallationError
from pip._internal.metadata import get_default_environment
from pip._internal.req.req_uninstall import uninstallation_paths

Expand All @@ -237,7 +236,8 @@ def guess_install_method() -> str:
else:
logging.debug("Skipping %s as it is not installed.", package_name)
use_pip = False
except (UninstallationError, AttributeError, ImportError) as exc:
# pylint: disable=broad-except
except Exception as exc:
# On Fedora 36, we got a AttributeError exception from pip that we want to avoid
logging.debug(exc)
use_pip = False
Expand Down

0 comments on commit 4f04991

Please sign in to comment.