Merge "Remove extra copy.deepcopy"

This commit is contained in:
Zuul 2018-08-17 06:48:46 +00:00 committed by Gerrit Code Review
commit e49586e458
1 changed files with 1 additions and 4 deletions

View File

@ -17,7 +17,6 @@
System-level utilities and helper functions.
"""
import copy
import math
import re
import unicodedata
@ -394,9 +393,7 @@ def mask_dict_password(dictionary, secret="***"): # nosec
if not isinstance(dictionary, dict):
raise TypeError("Expected a dictionary, got %s instead."
% type(dictionary))
out = copy.deepcopy(dictionary)
out = {}
for k, v in dictionary.items():
if isinstance(v, dict):
out[k] = mask_dict_password(v, secret=secret)