From 0a8d39a9e9d5b0582bfbbeda7ba0e1f0eaaef49d Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Mon, 8 Aug 2016 09:32:44 -0700 Subject: [PATCH] Simplify code by using mask_dict_password (again) A patch to oslo.utils was done to make mask_dict_password() work like mask_password(). Using mask_dict_password() makes the code simpler and easier to understand. There was a previous patch (6ad85298c4b33648340f0987256a07d8d650f4aa) similar to this but it missed changing this occurrence. Change-Id: I25233e49555cee9f856c755b63234cb7ab31d6aa --- ironic/drivers/modules/agent_base_vendor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ironic/drivers/modules/agent_base_vendor.py b/ironic/drivers/modules/agent_base_vendor.py index f09228afa5..1c40065242 100644 --- a/ironic/drivers/modules/agent_base_vendor.py +++ b/ironic/drivers/modules/agent_base_vendor.py @@ -16,7 +16,6 @@ # License for the specific language governing permissions and limitations # under the License. -import ast import collections import time @@ -787,8 +786,8 @@ class BaseAgentVendor(AgentDeployMixin, base.VendorInterface): ndict = node.as_dict() if not context.show_password: - ndict['driver_info'] = ast.literal_eval( - strutils.mask_password(ndict['driver_info'], "******")) + ndict['driver_info'] = strutils.mask_dict_password( + ndict['driver_info'], "******") return { # heartbeat_timeout is a config, so moving it into the