1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix false positives in no-get-exception test.

This commit is contained in:
Matt Clay 2019-01-15 09:06:41 -08:00
parent d60d794411
commit 332dc6a93a

View file

@ -19,7 +19,7 @@ def main():
with open(path, 'r') as path_fd: with open(path, 'r') as path_fd:
for line, text in enumerate(path_fd.readlines()): for line, text in enumerate(path_fd.readlines()):
match = re.search(r'(get_exception)', text) match = re.search(r'([^a-zA-Z0-9_]get_exception[^a-zA-Z0-9_])', text)
if match: if match:
if path == 'lib/ansible/module_utils/basic.py' and basic_allow_once: if path == 'lib/ansible/module_utils/basic.py' and basic_allow_once: