Skip to content

Commit

Permalink
Python: Handle empty output.
Browse files Browse the repository at this point in the history
This problem does not manifest on my machine, so I can only hope that this solves it.
  • Loading branch information
petervdonovan committed Jan 19, 2022
1 parent 01e7fee commit f5aae38
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ public Strategy getErrorReportingStrategy() {
public Strategy getOutputReportingStrategy() {
return (validationOutput, errorReporter, codeMaps) -> {
try {
for (PylintMessage message : mapper.readValue(validationOutput, PylintMessage[].class)) {
if (validationOutput.isBlank()) return;
for (PylintMessage message : mapper.readValue(validationOutput.strip(), PylintMessage[].class)) {
if (shouldIgnore(message)) continue;
CodeMap map = codeMaps.get(message.getPath(fileConfig.getSrcGenPath()));
if (map != null) {
Expand Down

0 comments on commit f5aae38

Please sign in to comment.