there could be an exc

This commit is contained in:
JerryXiao 2021-01-18 14:59:57 +08:00
parent b43589a01e
commit 7c67531f48
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA

View file

@ -252,11 +252,16 @@ def main() -> None:
elif args.action == 'status': elif args.action == 'status':
count = 0 count = 0
failed = False failed = False
for entry in read_db():
if e := entry.get('error'):
print(e)
failed = True
break
for entry in read_db(): for entry in read_db():
if report_dict := entry.get('report'): if report_dict := entry.get('report'):
count += 1 count += 1
report = checkReport(**report_dict) report = checkReport(**report_dict)
if count == 1: if not failed and count == 1:
failed = report.failed failed = report.failed
print(report.summary(verbose=args.verbose, show_package=True)) print(report.summary(verbose=args.verbose, show_package=True))
if count >= args.max and args.max > 0: if count >= args.max and args.max > 0: