Sync latest strutils from oslo-incubator for mask_password fix
This sync pulls in:
1131b56 Enable mask_password to handle byte code strings
This is the only update since the last sync:
beca4db
Sync latest strutils from oslo-incubator
This is needed to fix a delete volume failure when processutils
calls mask_password with a byte code string.
Change-Id: Ie8a8c8e26abc0e387830bc9246e9a44913ae9b24
Closes-bug: #1368527
This commit is contained in:
parent
4b2600fe3e
commit
cb5bcca025
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue