summaryrefslogtreecommitdiff
path: root/examples/roster_browser.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/roster_browser.py')
-rwxr-xr-x[-rw-r--r--]examples/roster_browser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/roster_browser.py b/examples/roster_browser.py
index b366d00f..a16de24c 100644..100755
--- a/examples/roster_browser.py
+++ b/examples/roster_browser.py
@@ -24,8 +24,8 @@ from sleekxmpp.exceptions import IqError, IqTimeout
# throughout SleekXMPP, we will set the default encoding
# ourselves to UTF-8.
if sys.version_info < (3, 0):
- reload(sys)
- sys.setdefaultencoding('utf8')
+ from sleekxmpp.util.misc_ops import setdefaultencoding
+ setdefaultencoding('utf8')
else:
raw_input = input
@@ -68,7 +68,7 @@ class RosterBrowser(sleekxmpp.ClientXMPP):
try:
self.get_roster()
except IqError as err:
- print('Error: %' % err.iq['error']['condition'])
+ print('Error: %s' % err.iq['error']['condition'])
except IqTimeout:
print('Error: Request timed out')
self.send_presence()