Merge pull request #76 from radiorabe/feature/no-more-std_err_override-for-pypo
Problem: std_err_override is a hack for python < 2.7
This commit is contained in:
commit
479bdb1c80
6 changed files with 6 additions and 17 deletions
|
@ -28,7 +28,6 @@ from configobj import ConfigObj
|
||||||
# custom imports
|
# custom imports
|
||||||
#from util import *
|
#from util import *
|
||||||
from api_clients import *
|
from api_clients import *
|
||||||
from std_err_override import LogWriter
|
|
||||||
|
|
||||||
LOG_LEVEL = logging.INFO
|
LOG_LEVEL = logging.INFO
|
||||||
LOG_PATH = '/var/log/airtime/pypo/notify.log'
|
LOG_PATH = '/var/log/airtime/pypo/notify.log'
|
||||||
|
@ -54,6 +53,7 @@ parser.add_option("-n", "--liquidsoap-started", help="notify liquidsoap started"
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
# Set up logging
|
# Set up logging
|
||||||
|
logging.captureWarnings(True)
|
||||||
logFormatter = logging.Formatter("%(asctime)s [%(module)s] [%(levelname)-5.5s] %(message)s")
|
logFormatter = logging.Formatter("%(asctime)s [%(module)s] [%(levelname)-5.5s] %(message)s")
|
||||||
rootLogger = logging.getLogger()
|
rootLogger = logging.getLogger()
|
||||||
rootLogger.setLevel(LOG_LEVEL)
|
rootLogger.setLevel(LOG_LEVEL)
|
||||||
|
|
|
@ -31,11 +31,11 @@ from configobj import ConfigObj
|
||||||
|
|
||||||
# custom imports
|
# custom imports
|
||||||
from api_clients import api_client
|
from api_clients import api_client
|
||||||
#from std_err_override import LogWriter
|
|
||||||
import pure
|
import pure
|
||||||
|
|
||||||
LOG_PATH = '/var/log/airtime/pypo/pypo.log'
|
LOG_PATH = '/var/log/airtime/pypo/pypo.log'
|
||||||
LOG_LEVEL = logging.INFO
|
LOG_LEVEL = logging.INFO
|
||||||
|
logging.captureWarnings(True)
|
||||||
|
|
||||||
# Set up command-line options
|
# Set up command-line options
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
|
|
|
@ -18,7 +18,6 @@ from threading import Thread, Timer
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
from api_clients import api_client
|
from api_clients import api_client
|
||||||
from std_err_override import LogWriter
|
|
||||||
from timeout import ls_timeout
|
from timeout import ls_timeout
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,8 +27,7 @@ def keyboardInterruptHandler(signum, frame):
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
signal.signal(signal.SIGINT, keyboardInterruptHandler)
|
signal.signal(signal.SIGINT, keyboardInterruptHandler)
|
||||||
|
|
||||||
#need to wait for Python 2.7 for this..
|
logging.captureWarnings(True)
|
||||||
#logging.captureWarnings(True)
|
|
||||||
|
|
||||||
POLL_INTERVAL = 480
|
POLL_INTERVAL = 480
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,9 @@ import json
|
||||||
import hashlib
|
import hashlib
|
||||||
from requests.exceptions import ConnectionError, HTTPError, Timeout
|
from requests.exceptions import ConnectionError, HTTPError, Timeout
|
||||||
|
|
||||||
from std_err_override import LogWriter
|
|
||||||
|
|
||||||
CONFIG_PATH = '/etc/airtime/airtime.conf'
|
CONFIG_PATH = '/etc/airtime/airtime.conf'
|
||||||
|
|
||||||
#need to wait for Python 2.7 for this..
|
logging.captureWarnings(True)
|
||||||
#logging.captureWarnings(True)
|
|
||||||
|
|
||||||
|
|
||||||
class PypoFile(Thread):
|
class PypoFile(Thread):
|
||||||
|
|
|
@ -13,10 +13,7 @@ from kombu.simple import SimpleQueue
|
||||||
from amqp.exceptions import AMQPError
|
from amqp.exceptions import AMQPError
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from std_err_override import LogWriter
|
logging.captureWarnings(True)
|
||||||
|
|
||||||
#need to wait for Python 2.7 for this..
|
|
||||||
#logging.captureWarnings(True)
|
|
||||||
|
|
||||||
|
|
||||||
class PypoMessageHandler(Thread):
|
class PypoMessageHandler(Thread):
|
||||||
|
|
|
@ -21,12 +21,9 @@ from Queue import Empty, Queue
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
from api_clients import api_client
|
from api_clients import api_client
|
||||||
from std_err_override import LogWriter
|
|
||||||
from timeout import ls_timeout
|
from timeout import ls_timeout
|
||||||
|
|
||||||
|
logging.captureWarnings(True)
|
||||||
#need to wait for Python 2.7 for this..
|
|
||||||
#logging.captureWarnings(True)
|
|
||||||
|
|
||||||
PUSH_INTERVAL = 2
|
PUSH_INTERVAL = 2
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue