Correct bilean reraising of exception

When an exception was caught and rethrown, it should call 'raise'
without any arguments because it shows the place where an exception
occured initially instead of place where the exception re-raised

Change-Id: Iee0d0c14c77e4ae2dbd0c3661eb7e3959a244290
This commit is contained in:
gengchc2 2016-08-26 08:59:31 +00:00
parent e09fdeddad
commit c6e90aaed2
1 changed files with 2 additions and 2 deletions

View File

@ -228,8 +228,8 @@ class String(Schema):
def resolve(self, value):
try:
return str(value)
except (TypeError, ValueError) as ex:
raise ex
except (TypeError, ValueError):
raise
def validate(self, value, context=None):
if not isinstance(value, six.string_types):