From ac528c0368f94d77270828765f5131d893de5b4f Mon Sep 17 00:00:00 2001 From: Ajinkya Udgirkar Date: Tue, 13 Jun 2023 17:32:48 +0530 Subject: [PATCH] Update guess install method check (#3553) --- src/ansiblelint/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansiblelint/config.py b/src/ansiblelint/config.py index fd804407f8..a952137286 100644 --- a/src/ansiblelint/config.py +++ b/src/ansiblelint/config.py @@ -207,7 +207,7 @@ def guess_install_method() -> str: package_name = "ansible-lint" try: - if distribution(package_name).read_text("INSTALLER").strip() != "pip": # type: ignore[union-attr] + if (distribution(package_name).read_text("INSTALLER") or "").strip() != "pip": return "" except PackageNotFoundError as exc: logging.debug(exc)