# HG changeset patch # User souliane # Date 1413970935 -7200 # Node ID 38fb8823cee8b518ed63d934453a1b4f7c18f19b # Parent 87fbe46404480b4bfa752b26da56e194b27bfe88 plugin XEP-0054: the fix by revision 1248 (77a4592816f6) was not complete diff -r 87fbe4640448 -r 38fb8823cee8 src/plugins/plugin_xep_0054.py --- a/src/plugins/plugin_xep_0054.py Mon Oct 20 20:46:10 2014 +0200 +++ b/src/plugins/plugin_xep_0054.py Wed Oct 22 11:42:15 2014 +0200 @@ -205,11 +205,10 @@ def vcard_err(self, failure, profile): """Called when something is wrong with registration""" try: - if failure.value.stanza.hasAttribute("from"): - log.error(_("Can't find VCard of %s") % failure.value.stanza['from']) - except AttributeError: + log.error(_("Can't find VCard of %s") % failure.value.stanza['from']) + self.host.bridge.actionResult("SUPPRESS", failure.value.stanza['id'], {}, profile) # FIXME: maybe an error message would be better + except AttributeError: # 'ConnectionLost' object has no attribute 'stanza' log.error(_("Can't find VCard: %s") % failure.getErrorMessage()) - self.host.bridge.actionResult("SUPPRESS", failure.value.stanza['id'], {}, profile) # FIXME: maybe an error message would be better def getCard(self, target_s, profile_key=C.PROF_KEY_NONE): """Ask server for VCard