remove six in venus/api/middleware/fault.py

Change-Id: I12160a148cd2152a5513d17dfef06053436a5b22
This commit is contained in:
kuangcx 2020-12-22 17:27:12 -08:00
parent a84acc129d
commit 0d55a9c81a

View File

@ -13,7 +13,6 @@
# under the License.
from oslo_log import log as logging
import six
import webob.dec
import webob.exc
@ -61,7 +60,7 @@ class FaultWrapper(base_wsgi.Middleware):
# including those that are safe to expose, see bug 1021373
if safe:
msg = (inner.msg if isinstance(inner, exception.VenusException)
else six.text_type(inner))
else str(inner))
params = {'exception': inner.__class__.__name__,
'explanation': msg}
outer.explanation = _('%(exception)s: %(explanation)s') % params