Skip to content

Commit

Permalink
allow webob 1.8.x
Browse files Browse the repository at this point in the history
Change-Id: Ic2a68d102cd8002b7d936f5aee6d4d16deaedda8
  • Loading branch information
bjhuangr committed May 16, 2018
1 parent 97d7471 commit abd72e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -4,4 +4,4 @@ PyJWT>=1.0.1 # MIT
requests>=2.6.0 # Apache-2.0
Routes>=2.2 # MIT
six>=1.9.0 # MIT
WebOb>=1.2.3,<1.8.0 # MIT
WebOb>=1.2.3 # MIT
4 changes: 2 additions & 2 deletions zvmsdk/sdkwsgi/util.py
Expand Up @@ -199,7 +199,7 @@ class SdkWsgify(wsgify):
def call_func(self, req, *args, **kwargs):
"""Add json_error_formatter to any webob HTTPExceptions."""
try:
super(SdkWsgify, self).call_func(req, *args, **kwargs)
return super(SdkWsgify, self).call_func(req, *args, **kwargs)
except webob.exc.HTTPException as exc:
msg = ('encounter %(error)s error') % {'error': exc}
LOG.debug(msg)
Expand All @@ -215,4 +215,4 @@ def call_func(self, req, *args, **kwargs):
'output': '',
'errmsg': explanation}
exc.text = six.text_type(json.dumps(fault_data))
return exc
raise exc
1 change: 0 additions & 1 deletion zvmsdk/tests/unit/sdkwsgi/handlers/test_guest.py
Expand Up @@ -359,7 +359,6 @@ def test_guest_invalid_action(self, mock_userid):
self.req.body = '{"fake": "None"}'

mock_userid.return_value = FAKE_USERID

self.assertRaises(webob.exc.HTTPBadRequest, guest.guest_action,
self.req)

Expand Down

0 comments on commit abd72e7

Please sign in to comment.