fix pipe | encoding problem

This commit is contained in:
Luxing Huang 2017-01-15 18:10:49 -04:00
parent 7b38e264bc
commit 8aa4933f8d
1 changed files with 1 additions and 1 deletions

View File

@ -1326,7 +1326,7 @@ def shell():
line = ('%(id)5s) %(sponsor)s (%(name)s, %(country)s) '
'[%(d)0.2f km]' % server)
try:
print_(line)
print_(line.encode('utf-8'))
except IOError:
e = sys.exc_info()[1]
if e.errno != errno.EPIPE: