mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
0b295e2c87
commit
d7e8741f02
1 changed files with 8 additions and 3 deletions
|
@ -272,7 +272,8 @@ def _load_accumulators():
|
|||
with open(path, 'rb') as f:
|
||||
loaded = serial.load(f)
|
||||
return loaded if loaded else ret
|
||||
except IOError:
|
||||
except (IOError, NameError):
|
||||
# NameError is a msgpack error from salt-ssh
|
||||
return ret
|
||||
|
||||
loaded = _deserialize(_get_accumulator_filepath())
|
||||
|
@ -286,8 +287,12 @@ def _persist_accummulators(accumulators, accumulators_deps):
|
|||
'accumulators_deps': accumulators_deps}
|
||||
|
||||
serial = salt.payload.Serial(__opts__)
|
||||
with open(_get_accumulator_filepath(), 'w+b') as f:
|
||||
serial.dump(accumm_data, f)
|
||||
try:
|
||||
with open(_get_accumulator_filepath(), 'w+b') as f:
|
||||
serial.dump(accumm_data, f)
|
||||
except NameError:
|
||||
# msgpack error from salt-ssh
|
||||
pass
|
||||
|
||||
|
||||
def _check_user(user, group):
|
||||
|
|
Loading…
Add table
Reference in a new issue