From 2218e763f8025b2158e6bd72f032af82f5d5c421 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Wed, 18 Nov 2015 16:18:21 -0800 Subject: [PATCH] Get the index of the tab, not the line itself --- ansible_testing/modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_testing/modules.py b/ansible_testing/modules.py index 4bb86858ee0..34d409d63a7 100644 --- a/ansible_testing/modules.py +++ b/ansible_testing/modules.py @@ -177,7 +177,7 @@ class ModuleValidator(Validator): indent = INDENT_REGEX.search(line) for i in indent.groups(): if '\t' in i: - index = line.index(i) + index = line.index('\t') self.errors.append('indentation contains tabs. line %d ' 'column %d' % (line_no + 1, index))