diff frontends/src/quick_frontend/quick_app.py @ 2167:4b78b4c7f805

core, frontends: various fixes for Libervia: - quick_app: don't fail when we can't get autodisconnect parameter - bridge: removed useless BridgeFrontend parent class - use of TypeError, unicode and list to workaround Pyjamas incompatibilities
author Goffi <goffi@goffi.org>
date Sun, 26 Feb 2017 18:23:01 +0100
parents be96beb7ca14
children 8b37a62336c3
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Sun Feb 26 18:20:27 2017 +0100
+++ b/frontends/src/quick_frontend/quick_app.py	Sun Feb 26 18:23:01 2017 +0100
@@ -76,10 +76,15 @@
         self.whoami = jid.JID(jid_s)  # resource might change after the connection
         self.bridge.isConnected(self.profile, callback=self._plug_profile_isconnected)
 
+    def _autodisconnectEb(self, failure_):
+        # XXX: we ignore error on this parameter, as Libervia can't access it
+        log.warning(_("Error while trying to get autodisconnect param, ignoring: {}").format(failure_))
+        self._plug_profile_autodisconnect("false")
+
     def _plug_profile_isconnected(self, connected):
         self.connected = connected
         self.bridge.asyncGetParamA("autodisconnect", "Connection", profile_key=self.profile,
-                                   callback=self._plug_profile_autodisconnect, errback=self._getParamError)
+                                   callback=self._plug_profile_autodisconnect, errback=self._autodisconnectEb)
 
     def _plug_profile_autodisconnect(self, autodisconnect):
         if C.bool(autodisconnect):