支持打印具体报错详情,文件及内容行数显示
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#! -*- coding: utf-8 -*-
|
||||
import os, json, sqlite3
|
||||
import os, json, sqlite3, sys, traceback
|
||||
|
||||
def check_json(f, _dir):
|
||||
if not f.endswith('.json'):
|
||||
@ -11,6 +11,7 @@ def check_json(f, _dir):
|
||||
_ = json.loads(file.read())
|
||||
return True
|
||||
except:
|
||||
sys.stderr.write(traceback.format_exc())
|
||||
assert False, u"校验(%s)失败" % f
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user