CC-2838: Character encoding errors with telnet'ing

show name to Liquidsoap

-fixed
This commit is contained in:
martin 2011-09-18 19:32:39 -04:00
parent d824eb7622
commit 0e503517f5
2 changed files with 7 additions and 3 deletions

View file

@ -162,9 +162,11 @@ class PypoPush(Thread):
logger.debug('Preparing to push playlist %s' % pkey)
for item in playlist:
annotate = str(item['annotate'])
tn.write(('queue.push %s\n' % annotate).encode('latin-1'))
tn.write(('vars.show_name %s\n' % item['show_name']).encode('latin-1'))
annotate = item['annotate']
tn.write(str('queue.push %s\n' % annotate.encode('utf-8')))
show_name = item['show_name']
tn.write(str('vars.show_name %s\n' % show_name.encode('utf-8')))
tn.write("exit\n")
logger.debug(tn.read_all())