CC-3207: Exception 'latin-1' codec can't encode character u'\u2013' in

position 32: ordinal not in range(256)

- fixed
This commit is contained in:
James 2011-12-15 16:09:58 -05:00
parent 6efef7b174
commit 22b2b466e5
2 changed files with 6 additions and 6 deletions

View File

@ -3,8 +3,8 @@ import shutil
from subprocess import Popen, PIPE
import sys
import os
sys.path.append('/usr/lib/airtime/api_clients/')
import api_client
sys.path.append('/usr/lib/airtime/')
from api_clients import api_client
from configobj import ConfigObj
if os.geteuid() != 0:
@ -54,7 +54,7 @@ def generate_liquidsoap_config(ss):
temp = "0"
buffer += temp
buffer += "\n"
fh.write(buffer)
fh.write(api_client.encode_to(buffer))
fh.write("log_file = \"/var/log/airtime/pypo-liquidsoap/<script>.log\"\n");
fh.close()
@ -93,8 +93,8 @@ try:
#generate liquidsoap config file
#access the DB and generate liquidsoap.cfg under /etc/airtime/
api_client = api_client.api_client_factory(config)
ss = api_client.get_stream_setting()
ac = api_client.api_client_factory(config)
ss = ac.get_stream_setting()
if ss is not None:
generate_liquidsoap_config(ss)

View File

@ -204,7 +204,7 @@ class PypoFetch(Thread):
temp = "0"
buffer += temp
buffer += "\n"
fh.write(buffer)
fh.write(api_client.encode_to(buffer))
fh.write("log_file = \"/var/log/airtime/pypo-liquidsoap/<script>.log\"\n");
fh.close()
# restarting pypo.