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:
parent
6efef7b174
commit
22b2b466e5
2 changed files with 6 additions and 6 deletions
|
@ -3,8 +3,8 @@ import shutil
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
sys.path.append('/usr/lib/airtime/api_clients/')
|
sys.path.append('/usr/lib/airtime/')
|
||||||
import api_client
|
from api_clients import api_client
|
||||||
from configobj import ConfigObj
|
from configobj import ConfigObj
|
||||||
|
|
||||||
if os.geteuid() != 0:
|
if os.geteuid() != 0:
|
||||||
|
@ -54,7 +54,7 @@ def generate_liquidsoap_config(ss):
|
||||||
temp = "0"
|
temp = "0"
|
||||||
buffer += temp
|
buffer += temp
|
||||||
buffer += "\n"
|
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.write("log_file = \"/var/log/airtime/pypo-liquidsoap/<script>.log\"\n");
|
||||||
fh.close()
|
fh.close()
|
||||||
|
|
||||||
|
@ -93,8 +93,8 @@ try:
|
||||||
|
|
||||||
#generate liquidsoap config file
|
#generate liquidsoap config file
|
||||||
#access the DB and generate liquidsoap.cfg under /etc/airtime/
|
#access the DB and generate liquidsoap.cfg under /etc/airtime/
|
||||||
api_client = api_client.api_client_factory(config)
|
ac = api_client.api_client_factory(config)
|
||||||
ss = api_client.get_stream_setting()
|
ss = ac.get_stream_setting()
|
||||||
|
|
||||||
if ss is not None:
|
if ss is not None:
|
||||||
generate_liquidsoap_config(ss)
|
generate_liquidsoap_config(ss)
|
||||||
|
|
|
@ -204,7 +204,7 @@ class PypoFetch(Thread):
|
||||||
temp = "0"
|
temp = "0"
|
||||||
buffer += temp
|
buffer += temp
|
||||||
buffer += "\n"
|
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.write("log_file = \"/var/log/airtime/pypo-liquidsoap/<script>.log\"\n");
|
||||||
fh.close()
|
fh.close()
|
||||||
# restarting pypo.
|
# restarting pypo.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue