Added checks for potential problems when listing files

This commit is contained in:
2013-07-15 22:27:06 +10:00
parent df4aefeca1
commit 35ca21e4e4
4 changed files with 58 additions and 15 deletions

View File

@@ -28,6 +28,18 @@ class EncodeData:
return "Show: {0}\nInput: {1}\nOutput: " \
"{2}\n".format(self.show, self.inputfile, self.outputfile)
def checkproblems(self):
"""
Check the EncodeData object for any potential problems.
"""
errors = []
if os.path.exists(self.outputfile):
errors.append("FILE_EXISTS")
return errors
class FileManager:
"""