def __call__(self, string): if not os.path.exists(string): raise ValueError("File does not exist: %s" % string) return FileType.__call__(self, string)
def __call__(self, string): if string != "-" and os.path.exists(string): raise ValueError("File exists: %s" % string) return FileType.__call__(self, string)