From ca4adc5a8c3d195131f65b6799fd9d3b7eb4491b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 15 Oct 2019 21:53:04 +0200 Subject: [PATCH] fix: Fix interface exit (oops) --- src/aria2p/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aria2p/interface.py b/src/aria2p/interface.py index 724019f..1103dc2 100644 --- a/src/aria2p/interface.py +++ b/src/aria2p/interface.py @@ -390,6 +390,8 @@ def run(self): # avoid crashing the interface if exceptions occur while processing an event try: self.process_event(event) + except Exit: + return True except Exception as error: # TODO: display error in status bar logger.exception(error) @@ -416,8 +418,6 @@ def run(self): # sleep and increment frame time.sleep(self.sleep) self.frame = (self.frame + 1) % self.frames - except Exit: - return True except Exception as error: logger.exception(error) return False