From d974e9ad6689a7d8e08c5b9e378814d98e25d1df Mon Sep 17 00:00:00 2001 From: souliane Date: Wed, 22 Oct 2014 11:42:15 +0200 Subject: [PATCH] plugin XEP-0054: the fix by revision 1248 (77a4592816f6) was not complete --- src/plugins/plugin_xep_0054.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/plugin_xep_0054.py b/src/plugins/plugin_xep_0054.py index 58b83c2e..fcac00e6 100755 --- a/src/plugins/plugin_xep_0054.py +++ b/src/plugins/plugin_xep_0054.py @@ -205,11 +205,10 @@ class XEP_0054(object): 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