diff --git a/cinder/openstack/common/strutils.py b/cinder/openstack/common/strutils.py index 6a74c07758c..afe535c612c 100644 --- a/cinder/openstack/common/strutils.py +++ b/cinder/openstack/common/strutils.py @@ -292,7 +292,12 @@ def mask_password(message, secret="***"): >>> mask_password("u'original_password' : u'aaaaa'") "u'original_password' : u'***'" """ - message = six.text_type(message) + try: + message = six.text_type(message) + except UnicodeDecodeError: + # NOTE(jecarey): Temporary fix to handle cases where message is a + # byte string. A better solution will be provided in Kilo. + pass # NOTE(ldbragst): Check to see if anything in message contains any key # specified in _SANITIZE_KEYS, if not then just return the message since