示例#1
0
 def __call__(self, value):
     # Session name can be a path or just a name.
     if (os.path.sep not in value
             and not VALID_SESSION_NAME_PATTERN.search(value)):
         raise ArgumentError(None, self.error_message)
     return value
示例#2
0
文件: input.py 项目: keita1314/httpie
 def __call__(self, value):
     # Session name can be a path or just a name.
     if (os.path.sep not in value
             and not VALID_SESSION_NAME_PATTERN.search(value)):
         raise ArgumentError(None, self.error_message)
     return value