Skip to content

Commit

Permalink
Hide pip error if not present (#3494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Et7f3 authored and audgirka committed May 26, 2023
1 parent afd16a1 commit 9e3f702
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ansiblelint/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ def guess_install_method() -> str:
logging.debug("Skipping %s as it is not installed.", package_name)
use_pip = False
# pylint: disable=broad-except
except AttributeError as exc:
except (AttributeError, ModuleNotFoundError) as exc:
# On Fedora 36, we got a AttributeError exception from pip that we want to avoid
# On NixOS, we got a ModuleNotFoundError exception from pip that we want to avoid
logging.debug(exc)
use_pip = False

Expand Down

0 comments on commit 9e3f702

Please sign in to comment.