Skip to content

Commit

Permalink
Print errors to console if lint is failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Rudnyh committed Aug 19, 2013
1 parent 2051dc5 commit b728f41
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,15 @@ def lint_external(filename, settings, interpreter, linter):

# parse STDOUT for warnings and errors
for line in proc.stdout:
warning = line.decode('utf-8').strip().split(':', 2)
line = line.decode('utf-8').strip()
warning = line.split(':', 2)
if len(warning) == 3:
warnings.append((int(warning[0]), int(warning[1]), warning[2]))
try:
warnings.append((int(warning[0]), int(warning[1]), warning[2]))
except (TypeError, ValueError):
print("Flake8Lint ERROR:", line)
else:
print("Flake8Lint ERROR:", line)

# and return them =)
return warnings
Expand Down

0 comments on commit b728f41

Please sign in to comment.