Skip to content

Commit

Permalink
Handle the case of pylint returning empty output
Browse files Browse the repository at this point in the history
  • Loading branch information
hithwen committed Oct 17, 2019
1 parent 8f7b447 commit 24e1b6d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def py3(check):

echo_info(u"Validating python3 compatibility of {}...".format(check))
cmd = ["pylint", "-f", "json", "--py3k", "-d", "W1618", "--persistent", "no", "--exit-zero", path_to_module]
results = json.loads(run_command(cmd, capture='stdout').stdout)
echo_info(u"\tRunning: {}".format(' '.join(cmd)))

output = run_command(cmd, capture='stdout', check=True).stdout
results = json.loads(output) if output else None

if results:
echo_failure(u"Incompatibilities were found for {}:".format(check))
Expand Down

0 comments on commit 24e1b6d

Please sign in to comment.