diff src/core/sat_main.py @ 2100:fbeeba721954

plugin android: first draft: - the plugin cancel its own import if it's not launched on Android platform - this plugin show a notification when a non MUC message is received when Cagou is not active - the device also optionally vibrate on notification
author Goffi <goffi@goffi.org>
date Mon, 19 Dec 2016 23:49:37 +0100
parents 0931b5a6213c
children c96fe007ca41
line wrap: on
line diff
--- a/src/core/sat_main.py	Sun Dec 18 20:21:31 2016 +0100
+++ b/src/core/sat_main.py	Mon Dec 19 23:49:37 2016 +0100
@@ -177,6 +177,9 @@
                 log.warning(u"Can't import plugin [{path}] because of an unavailale third party module:\n{msg}".format(
                     path=plugin_path, msg=e))
                 continue
+            except exceptions.CancelError as e:
+                log.info(u"Plugin [{path}] cancelled its own import: {msg}".format(path=plugin_path, msg=e))
+                continue
             except Exception as e:
                 import traceback
                 log.error(_(u"Can't import plugin [{path}]:\n{error}").format(path=plugin_path, error=traceback.format_exc()))