# HG changeset patch # User Goffi # Date 1457197256 -3600 # Node ID 0fe69871b71ff15a810b7249c0aa5f6cb4da190a # Parent abb2f253188eb7e4d4ce456df367f0cda81ec4b6 jp: moved KeyboardInterrupt catch one level higher, so it is also catched if the loop is not started diff -r abb2f253188e -r 0fe69871b71f frontends/src/jp/base.py --- a/frontends/src/jp/base.py Sat Mar 05 18:00:12 2016 +0100 +++ b/frontends/src/jp/base.py Sat Mar 05 18:00:56 2016 +0100 @@ -249,16 +249,16 @@ def run(self, args=None): self.args = self.parser.parse_args(args) - self.args.func() - if self._need_loop or self._auto_loop: - self._start_loop() + try: + self.args.func() + if self._need_loop or self._auto_loop: + self._start_loop() + except KeyboardInterrupt: + log.info(_("User interruption: good bye")) def _start_loop(self): self.loop = GLib.MainLoop() - try: - self.loop.run() - except KeyboardInterrupt: - log.info(_("User interruption: good bye")) + self.loop.run() def stop_loop(self): try: