diff src/plugins/plugin_xep_0054.py @ 639:99eee75ec1b7

core: better handling of profile_key and don't write the param file anymore - new error ProfileNotSetError and some methods use the default @NONE@ instead of @DEFAULT@ - do not output the .sat/param file anymore, it is not needed and created confusion - plugin XEP-0054: remove an error message at startup
author souliane <souliane@mailoo.org>
date Thu, 05 Sep 2013 21:03:52 +0200
parents 84a6e83157c2
children 787ee59dba9c
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0054.py	Thu Sep 05 20:57:00 2013 +0200
+++ b/src/plugins/plugin_xep_0054.py	Thu Sep 05 21:03:52 2013 +0200
@@ -199,7 +199,8 @@
 
     def vcard_err(self, failure, profile):
         """Called when something is wrong with registration"""
-        error(_("Can't find VCard of %s") % failure.value.stanza['from'])
+        if failure.value.stanza.hasAttribute("from"):
+            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
 
     def getCard(self, target_s, profile_key='@DEFAULT@'):