python3 ValueError object has no attribute message
Change-Id: I09862b245774ab4b26f2ea11dfe4d0cc1d4305b7
This commit is contained in:
parent
04bfb5778b
commit
e6dc1f0819
|
@ -12,6 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import six
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_messaging.rpc import client
|
||||
from webob import exc
|
||||
|
@ -68,8 +70,9 @@ class Controller(object):
|
|||
raise exc.HTTPServiceUnavailable(e.value)
|
||||
except ValueError as e:
|
||||
LOG.error('Exception during call of the method {method_name}: '
|
||||
'{exc}'.format(method_name=method_name, exc=str(e)))
|
||||
raise exc.HTTPBadRequest(e.message)
|
||||
'{exc}'.format(method_name=method_name,
|
||||
exc=six.text_type(e)))
|
||||
raise exc.HTTPBadRequest(six.text_type(e))
|
||||
|
||||
|
||||
def create_resource():
|
||||
|
|
Loading…
Reference in New Issue