Mercurial > libervia-backend
diff src/plugins/plugin_xep_0054.py @ 941:c6d8fc63b1db
core, plugins: host.getClient now raise an exception instead of returning None when no profile is found, plugins have been adapted consequently and a bit cleaned
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 28 Mar 2014 18:07:02 +0100 |
parents | 01342bfe9f41 |
children | 301b342c697a |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0054.py Fri Mar 28 18:06:51 2014 +0100 +++ b/src/plugins/plugin_xep_0054.py Fri Mar 28 18:07:02 2014 +0100 @@ -259,8 +259,6 @@ #TODO: This is a temporary way of setting avatar, as other VCard informations are not managed. # A proper full VCard management should be done (and more generaly a public/private profile) client = self.host.getClient(profile_key) - if not client: - raise exceptions.NotConnectedProfileError(_('Trying to set avatar for a non-existant or not connected profile')) vcard_set = IQ(client.xmlstream, 'set') d = threads.deferToThread(self._buildSetAvatar, vcard_set, filepath)