Merge "Fix reraise issue"

This commit is contained in:
Jenkins 2016-08-29 01:58:10 +00:00 committed by Gerrit Code Review
commit cfe4ba8f60
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ class TrustMiddleware(wsgi.Middleware):
if ex.code == 400: if ex.code == 400:
trust = None trust = None
else: else:
raise ex raise
if not trust: if not trust:
# Create a trust if no existing one found # Create a trust if no existing one found
trust = kc.trust_create(ctx.user, admin_id, ctx.project, ctx.roles) trust = kc.trust_create(ctx.user, admin_id, ctx.project, ctx.roles)

View File

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