comparison src/plugins/plugin_xep_0092.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 73873e9b56f7
children 899dc9cd0f35
comparison
equal deleted inserted replaced
940:92e41e7c7e00 941:c6d8fc63b1db
56 - name: Natural language name of the software 56 - name: Natural language name of the software
57 - version: specific version of the software 57 - version: specific version of the software
58 - os: operating system of the queried entity 58 - os: operating system of the queried entity
59 """ 59 """
60 client = self.host.getClient(profile_key) 60 client = self.host.getClient(profile_key)
61 if not client:
62 raise exceptions.ProfileUnknownError
63 iq_elt = compat.IQ(client.xmlstream, 'get') 61 iq_elt = compat.IQ(client.xmlstream, 'get')
64 iq_elt['to'] = jid_.full() 62 iq_elt['to'] = jid_.full()
65 query_elt = iq_elt.addElement("query", NS_VERSION) 63 query_elt = iq_elt.addElement("query", NS_VERSION)
66 d = iq_elt.send() 64 d = iq_elt.send()
67 d.addCallback(self._gotVersion) 65 d.addCallback(self._gotVersion)