CC-5986 - Fixed unit tests, removed unnecessary code from service execution files

This commit is contained in:
Duncan Sommerville 2015-01-28 13:19:50 -05:00
parent 875a9dfd8b
commit bc604b992e
11 changed files with 424 additions and 41 deletions

View file

@ -1,15 +1,3 @@
#!/bin/bash
set +e
cat /etc/default/locale | grep -i "LANG=.*UTF-\?8" > /dev/null
set -e
if [ "$?" != "0" ]; then
echo "non UTF-8 default locale found in /etc/default/locale." > /var/log/airtime/pypo/error.log
exit 1
fi
export HOME="/var/tmp/airtime/pypo/"
export LC_ALL=`cat /etc/default/locale | grep "LANG=" | cut -d= -f2 | tr -d "\n\""`
export TERM=xterm
exec python -m pypo > /var/log/airtime/pypo/py-interpreter.log 2>&1

View file

@ -76,9 +76,16 @@ parser.add_option("-c",
LIQUIDSOAP_MIN_VERSION = "1.1.1"
PYPO_HOME='/var/tmp/airtime/pypo/'
#need to wait for Python 2.7 for this..
#logging.captureWarnings(True)
def configure_environment():
os.environ["HOME"] = PYPO_HOME
os.environ["TERM"] = 'xterm'
configure_environment()
# need to wait for Python 2.7 for this..
logging.captureWarnings(True)
# configure logging
try: