From fd70768910064cbc5479e5cdfe6c30fec8b324f7 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 16 May 2012 10:28:30 -0400 Subject: [PATCH] fix bug with pypo crashing --- python_apps/pypo/pypopush.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index 441155774..b42cbfc58 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -87,10 +87,10 @@ class PypoPush(Thread): self.handle_new_media_schedule(media_schedule, liquidsoap_queue_approx, media_chain) next_media_item_chain = self.get_next_schedule_chain(chains) - chains.remove(next_media_item_chain) self.logger.debug("Next schedule chain: %s", next_media_item_chain) if next_media_item_chain is not None: + chains.remove(next_media_item_chain) tnow = datetime.utcnow() chain_start = datetime.strptime(next_media_item_chain[0]['start'], "%Y-%m-%d-%H-%M-%S") time_until_next_play = self.date_interval_to_seconds(chain_start - tnow)