comparison src/plugins/plugin_xep_0065.py @ 1675:fd143578fe89

plugin XEP-0065: fixed bad error handling
author Goffi <goffi@goffi.org>
date Wed, 25 Nov 2015 13:03:10 +0100
parents a34d7f621944
children 244a605623d6
comparison
equal deleted inserted replaced
1674:518a42587600 1675:fd143578fe89
758 defer.returnValue(self._cache_proxies[server]) 758 defer.returnValue(self._cache_proxies[server])
759 except KeyError: 759 except KeyError:
760 pass 760 pass
761 try: 761 try:
762 proxy = (yield self.host.findServiceEntities('proxy', 'bytestreams', profile=profile)).pop() 762 proxy = (yield self.host.findServiceEntities('proxy', 'bytestreams', profile=profile)).pop()
763 except (exceptions.CancelError, StopIteration): 763 except (defer.CancelledError, StopIteration):
764 notFound(server) 764 notFound(server)
765 iq_elt = client.IQ('get') 765 iq_elt = client.IQ('get')
766 iq_elt['to'] = proxy.full() 766 iq_elt['to'] = proxy.full()
767 iq_elt.addElement((NS_BS, 'query')) 767 iq_elt.addElement((NS_BS, 'query'))
768 768