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)
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)