diff --git a/sat/plugins/plugin_misc_android.py b/sat/plugins/plugin_misc_android.py index 299608bd..15cbaf35 100644 --- a/sat/plugins/plugin_misc_android.py +++ b/sat/plugins/plugin_misc_android.py @@ -245,5 +245,6 @@ class AndroidPlugin(object): return if self._csi_timer is not None: self._csi_timer.cancel() + self._csi_timer = None for client in self.host.getClients(C.PROF_KEY_ALL): self._csi.setActive(client) diff --git a/sat/plugins/plugin_xep_0352.py b/sat/plugins/plugin_xep_0352.py index 70a7ae91..70e96699 100644 --- a/sat/plugins/plugin_xep_0352.py +++ b/sat/plugins/plugin_xep_0352.py @@ -47,9 +47,16 @@ class XEP_0352(object): host.registerNamespace(u"csi", NS_CSI) def isActive(self, client): - if not client._xep_0352_enabled: + try: + if not client._xep_0352_enabled: + return True + return client._xep_0352_active + except AttributeError: + # _xep_0352_active can not be set if isActive is called before + # profileConnected has been called + log.debug(u"isActive called when XEP-0352 plugin has not yet set the " + u"attributes") return True - return client._xep_0352_active def profileConnected(self, client): if (NS_CSI, u'csi') in client.xmlstream.features: