]> kaliko git repositories - mpd-sima.git/commitdiff
Actually exit on error
authorkaliko <efrim@azylum.org>
Sat, 8 Feb 2014 13:08:17 +0000 (14:08 +0100)
committerkaliko <efrim@azylum.org>
Sat, 8 Feb 2014 13:08:17 +0000 (14:08 +0100)
sima/core.py
sima/launch.py

index adbefa2218a3016fcf553f238cc75e5730be0479..8e075b0a28ace0a7078ee87b98083d4c38454c50 100644 (file)
@@ -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):
index dbd15256569a76ab1fee96e495d04c1aa033f210..24802bf043701648a3635a88db79eec2eda0e9b4 100644 (file)
@@ -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)