mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
cab3c2fdc9
* - add more drawing func to effect engine - make provider rs232 less noisy - json checks: remove utf8 conversion temporarly and make it compat with py3 again * fix compile prob
25 lines
489 B
Python
25 lines
489 B
Python
#!/usr/bin/env python
|
|
import json, sys
|
|
|
|
print("-- validate json files")
|
|
|
|
retval = 0
|
|
total = 0
|
|
errors = 0
|
|
for filename in sys.argv[1:]:
|
|
with open(filename) as f:
|
|
total += 1
|
|
msg = " check json %s ... " % filename
|
|
try:
|
|
data = f.read()
|
|
json.loads(data)
|
|
#print(msg + "ok")
|
|
except ValueError as e:
|
|
print(msg + 'invalid ('+str(e)+')')
|
|
retval = 1
|
|
errors += 1
|
|
|
|
print(" checked files: %s success: %s errors: %s" % (total,(total-errors),errors))
|
|
|
|
sys.exit(retval)
|