summaryrefslogtreecommitdiff
path: root/examples/ibb_transfer
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ibb_transfer')
-rwxr-xr-xexamples/ibb_transfer/ibb_receiver.py4
-rwxr-xr-xexamples/ibb_transfer/ibb_sender.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/ibb_transfer/ibb_receiver.py b/examples/ibb_transfer/ibb_receiver.py
index b11acabf..18d18f92 100755
--- a/examples/ibb_transfer/ibb_receiver.py
+++ b/examples/ibb_transfer/ibb_receiver.py
@@ -21,8 +21,8 @@ import sleekxmpp
# 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
diff --git a/examples/ibb_transfer/ibb_sender.py b/examples/ibb_transfer/ibb_sender.py
index cd856378..7c380b68 100755
--- a/examples/ibb_transfer/ibb_sender.py
+++ b/examples/ibb_transfer/ibb_sender.py
@@ -21,8 +21,8 @@ import sleekxmpp
# 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