From 263a45eeb5d4409ce37b87ef9a5ca06ba3a0492e Mon Sep 17 00:00:00 2001 From: Shane Frischkorn Date: Sat, 13 Jul 2013 16:07:45 +1000 Subject: [PATCH] fixing check for existing output files --- TVEncoder.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/TVEncoder.py b/TVEncoder.py index 7dc2614..fc1393a 100644 --- a/TVEncoder.py +++ b/TVEncoder.py @@ -33,13 +33,20 @@ def print_shows(shows, filemanager): Prints he details of the shows. """ + existing = [] + for showdata in shows: if filemanager.checkfileexists(showdata.outputfile): - print colored("File {0} already exists!".format( - showdata.outputfile), 'red') + existing.append(showdata) print showdata + if len(existing) > 0: + print colored("The following shows have existing output files that " + "need to be fixed before proceeding:\n") + + for showdata in existing: + print colored(showdata) def processarguments(options): """