mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Pass filepointers to the serialize load functions.
This commit is contained in:
parent
f1c9de7ed9
commit
d12be52355
1 changed files with 2 additions and 2 deletions
|
@ -4075,10 +4075,10 @@ def serialize(name,
|
|||
if os.path.isfile(name):
|
||||
if formatter == 'yaml':
|
||||
with salt.utils.fopen(name, 'r') as fhr:
|
||||
existing_data = yaml.safe_load(fhr.read())
|
||||
existing_data = yaml.safe_load(fhr)
|
||||
elif formatter == 'json':
|
||||
with salt.utils.fopen(name, 'r') as fhr:
|
||||
existing_data = json.load(fhr.read())
|
||||
existing_data = json.load(fhr)
|
||||
else:
|
||||
return {'changes': {},
|
||||
'comment': ('{0} format is not supported for merging'
|
||||
|
|
Loading…
Add table
Reference in a new issue