Skip to content

Commit e8d6970

Browse files
committed
Catch JSON decode errors and present them as errors
1 parent a86fe6b commit e8d6970

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

linter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ def find_errors(self, output):
4444
logger.error(output)
4545
return
4646

47-
content = json.loads(output)
47+
try:
48+
content = json.loads(output)
49+
except ValueError:
50+
logger.error(output)
51+
return
4852

4953
if logger.isEnabledFor(logging.INFO):
5054
import pprint

0 commit comments

Comments
 (0)