Renamed variable to something more sensible.

This commit is contained in:
Sybren A. Stüvel 2016-04-25 11:43:31 +02:00
parent 48b1bda545
commit 9083a31812

View File

@ -12,12 +12,12 @@ def remove_private_keys(document):
"""Removes any key that starts with an underscore, returns result as new """Removes any key that starts with an underscore, returns result as new
dictionary. dictionary.
""" """
patch_info = copy.deepcopy(document) doc_copy = copy.deepcopy(document)
for key in list(patch_info.keys()): for key in list(doc_copy.keys()):
if key.startswith('_'): if key.startswith('_'):
del patch_info[key] del doc_copy[key]
return patch_info return doc_copy
class PillarJSONEncoder(json.JSONEncoder): class PillarJSONEncoder(json.JSONEncoder):