File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 5454 sys .exit (4 )
5555
5656__author__ = 'Hari Sekhon'
57- __version__ = '0.8.0'
57+ __version__ = '0.8.1'
58+
5859
5960class JsonValidatorTool (CLI ):
6061
@@ -137,7 +138,7 @@ def check_json(self, content):
137138 # as failing
138139 elif isJson (content .replace ("'" , '"' )):
139140 log .debug ('valid json (single quotes)' )
140- # self.single_quotes_detectedsingle_quotes_detected = True
141+ # self.single_quotes_detected = True
141142 if self .permit_single_quotes :
142143 self .msg = self .valid_json_msg_single_quotes
143144 self .print (content )
@@ -152,6 +153,8 @@ def check_json(self, content):
152153 self .iostream .seek (0 )
153154 if self .check_multirecord_json ():
154155 return True
156+ if not self .passthru :
157+ die (self .invalid_json_msg )
155158 # pointless since it would simply return 'ValueError: No JSON object could be decoded'
156159 # if self.verbose > 2:
157160 # try:
@@ -189,7 +192,7 @@ def run(self):
189192 continue
190193 if not os .path .exists (arg ):
191194 print ("'%s' not found" % arg )
192- sys .exit (ERRORS ['WARNING ' ])
195+ sys .exit (ERRORS ['CRITICAL ' ])
193196 if os .path .isfile (arg ):
194197 log_option ('file' , arg )
195198 elif os .path .isdir (arg ):
You can’t perform that action at this time.
0 commit comments