From cae35b4090eaeb8eec24c7ea77ec2311f3fc0608 Mon Sep 17 00:00:00 2001 From: kaliko Date: Sat, 8 Feb 2014 14:08:17 +0100 Subject: [PATCH] Actually exit on error --- sima/core.py | 1 + sima/launch.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sima/core.py b/sima/core.py index adbefa2..8e075b0 100644 --- a/sima/core.py +++ b/sima/core.py @@ -33,6 +33,7 @@ class Sima(Daemon): except (PlayerError, PlayerUnHandledError) as err: self.log.error('Fails to connect player: {}'.format(err)) self.shutdown() + sys.exit(1) self.short_history = deque(maxlen=60) def __get_player(self): diff --git a/sima/launch.py b/sima/launch.py index dbd1525..24802bf 100644 --- a/sima/launch.py +++ b/sima/launch.py @@ -42,11 +42,13 @@ def load_plugins(sima, source): except ImportError as err: logger.error('Failed to load plugin\'s module: {0} ({1})'.format(module, err)) sima.shutdown() + sys.exit(1) try: plugin_obj = getattr(mod_obj, plugin) except AttributeError as err: logger.error('Failed to load plugin {0} ({1})'.format(plugin, err)) sima.shutdown() + sys.exit(1) logger.info('Loading {0} plugin: {name} ({doc})'.format(source, **plugin_obj.info())) sima.register_plugin(plugin_obj) -- 2.39.5