Skip to content

Commit

Permalink
Improve ansible version check (#1381)
Browse files Browse the repository at this point in the history
Fixes: #1378
  • Loading branch information
ssbarnea authored Feb 19, 2021
1 parent 61c6464 commit f9f5041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ansiblelint/_prerun.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def check_ansible_presence() -> None:

if version.parse(release.__version__) <= version.parse(ANSIBLE_MIN_VERSION):
failed = True
except (ImportError, ModuleNotFoundError) as e:
except (ImportError, ModuleNotFoundError, UnboundLocalError) as e:
failed = True
__version__ = "none"
print(e, file=sys.stderr)
Expand Down

0 comments on commit f9f5041

Please sign in to comment.