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
This commit is contained in:
parent
ed9df2984d
commit
a6897c76e0
1 changed files with 25 additions and 140 deletions
|
|
@ -259,8 +259,6 @@ class XEP_0054(object):
|
|||
#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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue