Skip to content

Commit

Permalink
fix: Fix interface exit (oops)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Oct 15, 2019
1 parent b6de4c7 commit ca4adc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aria2p/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit ca4adc5

Please sign in to comment.