예제 #1
0
 def from_config(cls, config):
     if not "location" in config:
         raise ConfigurationError("invalid filesystem storage driver "
             "config: no storage location provided")
     
     try:
         creator = compile_path_pattern(config["location"])
     except ValueError, e:
         raise ConfigurationError("invalid filesystem storage location: "
             "%s" % e)
예제 #2
0
파일: sftp.py 프로젝트: enaeseth/permanence
 def from_config(cls, config):
     for key in ('host', 'remote_path', 'username'):
         if key not in config:
             raise ConfigurationError("invalid SFTP storage driver "
                 'configuration: no "%s" field provided' % key)
     
     try:
         creator = compile_path_pattern(config["remote_path"])
     except ValueError, e:
         raise ConfigurationError("invalid remote SFTP storage path: "
             "%s" % e)