Skip to content

Commit

Permalink
支持打印具体报错详情,文件及内容行数显示
Browse files Browse the repository at this point in the history
  • Loading branch information
jackeyGao committed Aug 7, 2018
1 parent e7610f3 commit eb76ac4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test_poetry.py
Original file line number Diff line number Diff line change
@@ -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'):
Expand All @@ -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


Expand Down

0 comments on commit eb76ac4

Please sign in to comment.