summaryrefslogtreecommitdiff
path: root/examples/pubsub_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pubsub_events.py')
-rw-r--r--examples/pubsub_events.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/pubsub_events.py b/examples/pubsub_events.py
index 6fe7159b..0dfb6c65 100644
--- a/examples/pubsub_events.py
+++ b/examples/pubsub_events.py
@@ -14,8 +14,8 @@ from sleekxmpp.xmlstream.handler import Callback
# 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