Linter fixes for cloudfront storage

This commit is contained in:
Joseph Schorr 2018-01-10 13:16:41 -05:00
parent 20b9a40585
commit f4f51934ef

View file

@ -619,7 +619,7 @@ class CloudFrontedS3Storage(S3Storage):
return super(CloudFrontedS3Storage, self).get_direct_download_url(path, request_ip,
expires_in, requires_cors,
head)
resolved_ip_info = None
logger.debug('Got direct download request for path "%s" with IP "%s"', path, request_ip)
if request_ip is not None:
@ -651,7 +651,7 @@ class CloudFrontedS3Storage(S3Storage):
signer = private_key.signer(padding.PKCS1v15(), hashes.SHA1())
signer.update(message)
return signer.finalize()
return handler
@lru_cache(maxsize=1)
@ -663,8 +663,8 @@ class CloudFrontedS3Storage(S3Storage):
return None
with self._context.config_provider.get_volume_file(cloudfront_privatekey_filename) as key_file:
return serialization.load_pem_private_key(
key_file.read(),
password=None,
backend=default_backend()
)
return serialization.load_pem_private_key(
key_file.read(),
password=None,
backend=default_backend()
)