Skip to content

Commit

Permalink
utf-8 workaround for python 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
chubin committed Jul 7, 2019
1 parent eced83f commit 8f78c78
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/srv.py
Expand Up @@ -16,6 +16,12 @@

from __future__ import print_function

import sys
if sys.version_info[0] < 3:
reload(sys)
sys.setdefaultencoding('utf8')


from gevent.monkey import patch_all
from gevent.pywsgi import WSGIServer
patch_all()
Expand Down

0 comments on commit 8f78c78

Please sign in to comment.