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):
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)