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