From 7c67531f48b4e9879241532ee30a03d59aa2228e Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 18 Jan 2021 14:59:57 +0800 Subject: [PATCH] there could be an exc --- src/pacroller/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pacroller/main.py b/src/pacroller/main.py index f6bf666..e73fef3 100644 --- a/src/pacroller/main.py +++ b/src/pacroller/main.py @@ -252,11 +252,16 @@ def main() -> None: elif args.action == 'status': count = 0 failed = False + for entry in read_db(): + if e := entry.get('error'): + print(e) + failed = True + break for entry in read_db(): if report_dict := entry.get('report'): count += 1 report = checkReport(**report_dict) - if count == 1: + if not failed and count == 1: failed = report.failed print(report.summary(verbose=args.verbose, show_package=True)) if count >= args.max and args.max > 0: