fixing check for existing output files

This commit is contained in:
2013-07-13 16:07:45 +10:00
parent b9df25ddf0
commit 263a45eeb5

View File

@@ -33,13 +33,20 @@ def print_shows(shows, filemanager):
Prints he details of the shows. Prints he details of the shows.
""" """
existing = []
for showdata in shows: for showdata in shows:
if filemanager.checkfileexists(showdata.outputfile): if filemanager.checkfileexists(showdata.outputfile):
print colored("File {0} already exists!".format( existing.append(showdata)
showdata.outputfile), 'red')
print 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): def processarguments(options):
""" """