Merge "Force error instantiation"

This commit is contained in:
Jenkins
2015-02-04 01:37:38 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ def get_acl(headers, body, bucket_owner, object_owner=None):
else:
if body:
# Specifying grant with both header and xml is not allowed.
raise UnexpectedContent
raise UnexpectedContent()
return acl

View File

@@ -152,7 +152,7 @@ class Request(swob.Request):
raise AccessDenied()
if 'Authorization' not in self.headers:
raise NotS3Request
raise NotS3Request()
try:
keyword, info = self.headers['Authorization'].split(' ', 1)
@@ -160,7 +160,7 @@ class Request(swob.Request):
raise AccessDenied()
if keyword != 'AWS':
raise NotS3Request
raise NotS3Request()
try:
access_key, signature = info.rsplit(':', 1)
@@ -663,7 +663,7 @@ class Request(swob.Request):
if not isinstance(value, int):
# check the instance because int() could build
# a long instance
raise ValueError
raise ValueError()
except ValueError:
err_msg = 'Provided %s not an integer or within ' \
'integer range' % param