linter: Fix issue with check-templates output.

We fix the issue of check-templates spitting out diff between
expected and found indentation of a file before mentioning the
error message and the file name. Basically stuff was being in the
wrong order despite the fact that in code stuff was happening in the
correct order ie, first print the error message along with the filename
and then the actual diff between expected and found file indentation.

Fixes: #9533.
This commit is contained in:
Aditya Bansal 2018-05-25 00:54:48 +05:30 committed by Tim Abbott
parent 6967b6519d
commit f9aa012486
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ def validate_indent_html(fn):
temp_file.write(phtml)
temp_file.close()
print('Invalid Indentation detected in file: '
'%s\nDiff for the file against expected indented file:' % (fn))
'%s\nDiff for the file against expected indented file:' % (fn), flush=True)
subprocess.call(['diff', fn, '/var/tmp/pretty_html.txt'], stderr=subprocess.STDOUT)
return 0
return 1