summaryrefslogtreecommitdiff
path: root/example.py
diff options
context:
space:
mode:
Diffstat (limited to 'example.py')
-rw-r--r--example.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/example.py b/example.py
index 71979c56..1ffe724a 100644
--- a/example.py
+++ b/example.py
@@ -5,8 +5,12 @@ import logging
from optparse import OptionParser
import time
-reload(sys)
-sys.setdefaultencoding('utf8')
+import sys
+
+if sys.version_info < (3,0):
+ reload(sys)
+ sys.setdefaultencoding('utf8')
+
class Example(sleekxmpp.ClientXMPP):