From 332dc6a93a1d791270fba012c8ebb28f3a70a81f Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 15 Jan 2019 09:06:41 -0800 Subject: [PATCH] Fix false positives in no-get-exception test. --- test/sanity/code-smell/no-get-exception.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sanity/code-smell/no-get-exception.py b/test/sanity/code-smell/no-get-exception.py index 748593d8a40..42200053ef2 100755 --- a/test/sanity/code-smell/no-get-exception.py +++ b/test/sanity/code-smell/no-get-exception.py @@ -19,7 +19,7 @@ def main(): with open(path, 'r') as path_fd: 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 path == 'lib/ansible/module_utils/basic.py' and basic_allow_once: