CC-2376: pypo-push thread sys.exits when exception is raised.
This commit is contained in:
parent
7d51a04082
commit
6e35a77268
|
@ -130,13 +130,16 @@ class PypoPush(Thread):
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
#logger.debug('Empty schedule')
|
#logger.debug('Empty schedule')
|
||||||
|
|
||||||
if not currently_on_air and self.liquidsoap_state_play:
|
if not currently_on_air and self.liquidsoap_state_play:
|
||||||
logger.debug('Notifying Liquidsoap to stop playback.')
|
logger.debug('Notifying Liquidsoap to stop playback.')
|
||||||
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
try:
|
||||||
tn.write('source.skip\n')
|
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
||||||
tn.write('exit\n')
|
tn.write('source.skip\n')
|
||||||
tn.read_all()
|
tn.write('exit\n')
|
||||||
|
tn.read_all()
|
||||||
|
except Exception, e:
|
||||||
|
logger.debug(e)
|
||||||
self.liquidsoap_state_play = False
|
self.liquidsoap_state_play = False
|
||||||
|
|
||||||
def push_liquidsoap(self, pkey, schedule, playlists):
|
def push_liquidsoap(self, pkey, schedule, playlists):
|
||||||
|
@ -233,6 +236,5 @@ class PypoPush(Thread):
|
||||||
try: self.push('scheduler')
|
try: self.push('scheduler')
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
logger.error('Pypo Push Error, exiting: %s', e)
|
logger.error('Pypo Push Error, exiting: %s', e)
|
||||||
sys.exit()
|
|
||||||
time.sleep(PUSH_INTERVAL)
|
time.sleep(PUSH_INTERVAL)
|
||||||
loops += 1
|
loops += 1
|
||||||
|
|
Loading…
Reference in New Issue