From 0075b2794789cbed20cc2ed70bcd4109fc48bf36 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Fri, 8 Mar 2013 14:57:20 -0500 Subject: [PATCH] CC-5015: Allow for cue_out points to be Null in DB -prep for 2.4 --- python_apps/pypo/pypopush.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index f438b3bb1..380992553 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -372,7 +372,17 @@ class PypoPush(Thread): first_link = chain[0] self.modify_cue_point(first_link) - if float(first_link['cue_in']) >= float(first_link['cue_out']): + + #ATM, we should never have an exception here. However in the future, it + #would be nice to allow cue_out to be None which would then allow us to + #fallback to the length of the track as the end point. + try: + end = first_link['cue_out'] + except TypeError: + #cue_out is type None + end = first_link['length'] + + if float(first_link['cue_in']) >= float(end): chain = chain [1:] return chain