Force error instantiation

Change-Id: I72d31c93043efcc9fc87b36cb44a2b8760976282
This commit is contained in:
Kota Tsuyuzaki
2015-02-02 01:59:22 -08:00
parent ff12a24b2a
commit 60ccf3c6c0
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