summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelya5 <E8sp56@web.de>2015-07-09 17:15:36 +0200
committerelya5 <E8sp56@web.de>2015-07-09 17:15:36 +0200
commitedd9199be83a0d62c5e18f830021bc13c34f2e00 (patch)
treef5f82f2e981f2560a21f6d1b2125aa6ea5d89a82
parentbb094cc6498838cece046d9ed74881232fb5010d (diff)
downloadslixmpp-edd9199be83a0d62c5e18f830021bc13c34f2e00.tar.gz
slixmpp-edd9199be83a0d62c5e18f830021bc13c34f2e00.tar.bz2
slixmpp-edd9199be83a0d62c5e18f830021bc13c34f2e00.tar.xz
slixmpp-edd9199be83a0d62c5e18f830021bc13c34f2e00.zip
Fix UnboundlocalError in disco_browser.py example
If self.get is in self.info_types and self.items_types, only self['xep_0030'].get_info is executed and not self['xep_0030'].get_items. So the condition in line 129 is successful but items is not assigned.
-rwxr-xr-xexamples/disco_browser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/disco_browser.py b/examples/disco_browser.py
index aeb4fb5e..78626e7c 100755
--- a/examples/disco_browser.py
+++ b/examples/disco_browser.py
@@ -94,7 +94,7 @@ class Disco(sleekxmpp.ClientXMPP):
info = self['xep_0030'].get_info(jid=self.target_jid,
node=self.target_node,
block=True)
- elif self.get in self.items_types:
+ if self.get in self.items_types:
# The same applies from above. Listen for the
# disco_items event or pass a callback function
# if you need to process a non-blocking request.