From 824ae0105eacb0247e33ce29cebd65c1134786c7 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Sun, 15 Apr 2012 13:05:47 -0500 Subject: linhes-system: myth_status.py, handle case where conflicts is null and catch the excpetion --- abs/core/LinHES-system/myth_status.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/abs/core/LinHES-system/myth_status.py b/abs/core/LinHES-system/myth_status.py index f8222cb..ed5058c 100644 --- a/abs/core/LinHES-system/myth_status.py +++ b/abs/core/LinHES-system/myth_status.py @@ -90,12 +90,15 @@ print "" print "Conflicted Recordings:" print "----------------------" a=be.getConflictedRecordings() -if len(a) == 0: +try: + if len(a) == 0: + print " No conflicts" + else: + for i in a: + title_chan="%s (%s)" %(i.title, i.channame) + print " %s - %-50s " %(i.starttime,title_chan) +except: print " No conflicts" -else: - for i in a: - title_chan="%s (%s)" %(i.title, i.channame) - print " %s - %-50s " %(i.starttime,title_chan) print "" print "" -- cgit v0.12