From 52feabbe7641f19a17810438d2469b2395b2819f Mon Sep 17 00:00:00 2001 From: Paul Molodowitch Date: Wed, 24 Oct 2012 11:27:52 -0700 Subject: added setdefaultencoding method so reload(sys) not needed reload(sys) could cause problem in user code - ie, sys.stdout, excepthook, and displayhook would be reset, etc --- examples/disco_browser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/disco_browser.py') diff --git a/examples/disco_browser.py b/examples/disco_browser.py index 67e12d19..aeb4fb5e 100755 --- a/examples/disco_browser.py +++ b/examples/disco_browser.py @@ -23,8 +23,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 -- cgit v1.2.3