mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Use salt.utils.fopen()
This commit is contained in:
parent
edf7da8729
commit
f2c23ab4fe
@ -183,9 +183,11 @@ class CkMinions(object):
|
||||
if not greedy:
|
||||
minions.remove(id_)
|
||||
continue
|
||||
search_results = self.serial.load(
|
||||
salt.utils.fopen(datap, 'rb')
|
||||
).get(search_type)
|
||||
try:
|
||||
with salt.utils.fopen(datap, 'rb') as fp_:
|
||||
search_results = self.serial.load(fp_).get(search_type)
|
||||
except (IOError, OSError):
|
||||
continue
|
||||
if not salt.utils.subdict_match(search_results,
|
||||
expr,
|
||||
delimiter,
|
||||
|
Loading…
Reference in New Issue
Block a user