Skip to content

Commit

Permalink
Merge pull request meolu#489 from cclauss/patch-2
Browse files Browse the repository at this point in the history
reload() was moved and sys.setdefaultencoding() was removed in Python 3
  • Loading branch information
meolu authored Nov 27, 2018
2 parents c5f6f91 + ddd0047 commit 886ddf9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions walle/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ def index():
if app.config.get('ENV') != 'test':
register_socketio(app)

reload(sys)
sys.setdefaultencoding('utf-8')
try:
reload(sys)
sys.setdefaultencoding('utf-8')
except NameError:
pass

return app

Expand Down

0 comments on commit 886ddf9

Please sign in to comment.