From 96193464f30e31c2203e6bd396271de3b4e762b3 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Sat, 12 Oct 2019 14:49:16 -0500 Subject: [PATCH] Should work without triggering a NotificationException --- ctabus/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ctabus/__init__.py b/ctabus/__init__.py index 795b6dd..222ee1c 100644 --- a/ctabus/__init__.py +++ b/ctabus/__init__.py @@ -162,7 +162,6 @@ class Table: class CTABUSNotifictaionManager(NotificationManager): def on_done(self): EXIT.set() - quit(0) def gen_list(objs, data, *displays, key=None, sort=0, num_pic=True): @@ -305,6 +304,8 @@ def _main_periodic(args, stop_id, init_data): print("Error fetching times") if e < args.periodic: EXIT.wait(args.periodic - e) + if EXIT.is_set(): + quit(0) except KeyboardInterrupt: _done = True