diff --git a/python_apps/pypo/airtime-playout b/python_apps/pypo/airtime-playout index 5521c91ed..0df7b0ca0 100755 --- a/python_apps/pypo/airtime-playout +++ b/python_apps/pypo/airtime-playout @@ -9,7 +9,7 @@ SCRIPT=`readlink -f $0` pypo_path=`dirname $SCRIPT` api_client_path="/usr/lib/airtime/" -pypo_script="pypocli.py" +pypo_script="pypo.py" cd ${pypo_path} set +e diff --git a/python_apps/pypo/logging.cfg b/python_apps/pypo/configs/logging.cfg similarity index 100% rename from python_apps/pypo/logging.cfg rename to python_apps/pypo/configs/logging.cfg diff --git a/python_apps/pypo/notify_logging.cfg b/python_apps/pypo/configs/notify_logging.cfg similarity index 100% rename from python_apps/pypo/notify_logging.cfg rename to python_apps/pypo/configs/notify_logging.cfg diff --git a/python_apps/pypo/liquidsoap_bin b/python_apps/pypo/liquidsoap_bin deleted file mode 160000 index 492242f4b..000000000 --- a/python_apps/pypo/liquidsoap_bin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 492242f4bb7367afebbf2f096067cb5a5d3c0449 diff --git a/python_apps/pypo/liquidsoap_scripts/notify.sh b/python_apps/pypo/liquidsoap_scripts/notify.sh index fccb768fa..2a3bb8a1e 100755 --- a/python_apps/pypo/liquidsoap_scripts/notify.sh +++ b/python_apps/pypo/liquidsoap_scripts/notify.sh @@ -10,5 +10,5 @@ SCRIPT=`readlink -f $0` # Absolute path this script is in SCRIPTPATH=`dirname $SCRIPT` -cd ${SCRIPTPATH}/../ +cd ${SCRIPTPATH} timeout 45 python pyponotify.py "$@" diff --git a/python_apps/pypo/pyponotify.py b/python_apps/pypo/liquidsoap_scripts/pyponotify.py similarity index 99% rename from python_apps/pypo/pyponotify.py rename to python_apps/pypo/liquidsoap_scripts/pyponotify.py index 797d1ce9b..8828fabf3 100644 --- a/python_apps/pypo/pyponotify.py +++ b/python_apps/pypo/liquidsoap_scripts/pyponotify.py @@ -50,7 +50,7 @@ parser.add_option("-n", "--liquidsoap-started", help="notify liquidsoap started" (options, args) = parser.parse_args() # configure logging -logging.config.fileConfig("notify_logging.cfg") +logging.config.fileConfig("configs/notify_logging.cfg") logger = logging.getLogger('notify') LogWriter.override_std_err(logger) diff --git a/python_apps/pypo/pypocli.py b/python_apps/pypo/pypo.py similarity index 99% rename from python_apps/pypo/pypocli.py rename to python_apps/pypo/pypo.py index 89b3f091a..12bd426fb 100644 --- a/python_apps/pypo/pypocli.py +++ b/python_apps/pypo/pypo.py @@ -21,6 +21,7 @@ from threading import Lock from schedule.pypopush import PypoPush from schedule.pypofetch import PypoFetch from schedule.pypofile import PypoFile +from schedule import pure from recorder.recorder import Recorder from schedule.listenerstat import ListenerStat from pypomessagehandler import PypoMessageHandler @@ -34,7 +35,6 @@ from configobj import ConfigObj # custom imports from api_clients import api_client from std_err_override import LogWriter -import pure # Set up command-line options parser = OptionParser() @@ -81,7 +81,7 @@ LIQUIDSOAP_MIN_VERSION = "1.1.1" # configure logging try: - logging.config.fileConfig("logging.cfg") + logging.config.fileConfig("configs/logging.cfg") logger = logging.getLogger() LogWriter.override_std_err(logger) except Exception, e: diff --git a/python_apps/pypo/pypomessagehandler.py b/python_apps/pypo/pypomessagehandler.py index 56fa1389e..a4b2d07c2 100644 --- a/python_apps/pypo/pypomessagehandler.py +++ b/python_apps/pypo/pypomessagehandler.py @@ -15,7 +15,7 @@ import json from std_err_override import LogWriter # configure logging -logging.config.fileConfig("logging.cfg") +logging.config.fileConfig("configs/logging.cfg") logger = logging.getLogger('message_h') LogWriter.override_std_err(logger) diff --git a/python_apps/pypo/pure.py b/python_apps/pypo/schedule/pure.py similarity index 100% rename from python_apps/pypo/pure.py rename to python_apps/pypo/schedule/pure.py diff --git a/python_apps/pypo/schedule/pypofetch.py b/python_apps/pypo/schedule/pypofetch.py index 8aae00ecc..d0bbe1c09 100644 --- a/python_apps/pypo/schedule/pypofetch.py +++ b/python_apps/pypo/schedule/pypofetch.py @@ -11,7 +11,7 @@ import subprocess import signal from datetime import datetime import traceback -import pure +from schedule import pure from Queue import Empty from threading import Thread @@ -22,7 +22,7 @@ from std_err_override import LogWriter # configure logging -logging_cfg = os.path.join(os.path.dirname(__file__), "../logging.cfg") +logging_cfg = os.path.join(os.path.dirname(__file__), "../configs/logging.cfg") logging.config.fileConfig(logging_cfg) logger = logging.getLogger() LogWriter.override_std_err(logger) diff --git a/python_apps/pypo/schedule/pypofile.py b/python_apps/pypo/schedule/pypofile.py index 0c8c168be..2f35489e2 100644 --- a/python_apps/pypo/schedule/pypofile.py +++ b/python_apps/pypo/schedule/pypofile.py @@ -12,7 +12,7 @@ import stat from std_err_override import LogWriter # configure logging -logging_cfg = os.path.join(os.path.dirname(__file__), "../logging.cfg") +logging_cfg = os.path.join(os.path.dirname(__file__), "../configs/logging.cfg") logging.config.fileConfig(logging_cfg) logger = logging.getLogger() LogWriter.override_std_err(logger) diff --git a/python_apps/pypo/schedule/pypopush.py b/python_apps/pypo/schedule/pypopush.py index a93fd489b..f9cc1926b 100644 --- a/python_apps/pypo/schedule/pypopush.py +++ b/python_apps/pypo/schedule/pypopush.py @@ -25,7 +25,7 @@ from configobj import ConfigObj # configure logging -logging_cfg = os.path.join(os.path.dirname(__file__), "../logging.cfg") +logging_cfg = os.path.join(os.path.dirname(__file__), "../configs/logging.cfg") logging.config.fileConfig(logging_cfg) logger = logging.getLogger() LogWriter.override_std_err(logger)