mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
@@ -1,20 +1,20 @@
|
||||
import sys
|
||||
import json
|
||||
|
||||
if len(sys.argv) <= 1:
|
||||
exit(1)
|
||||
|
||||
status = 0
|
||||
|
||||
for file in sys.argv[1:]:
|
||||
with open(file, encoding="ISO-8859-1") as f:
|
||||
try:
|
||||
json.load(f)
|
||||
except ValueError as exception:
|
||||
print("JSON error in {}".format(file))
|
||||
print(exception)
|
||||
status = 1
|
||||
else:
|
||||
print("Valid {}".format(file))
|
||||
|
||||
exit(status)
|
||||
import sys
|
||||
import json
|
||||
|
||||
if len(sys.argv) <= 1:
|
||||
exit(1)
|
||||
|
||||
status = 0
|
||||
|
||||
for file in sys.argv[1:]:
|
||||
with open(file, encoding="ISO-8859-1") as f:
|
||||
try:
|
||||
json.load(f)
|
||||
except ValueError as exception:
|
||||
print("JSON error in {}".format(file))
|
||||
print(exception)
|
||||
status = 1
|
||||
else:
|
||||
print("Valid {}".format(file))
|
||||
|
||||
exit(status)
|
||||
|
||||
Reference in New Issue
Block a user