mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use msgpack utils for loads call, import msgpack for UnpackValueError
This commit is contained in:
parent
34a478dfe5
commit
ba70df9d62
1 changed files with 2 additions and 1 deletions
|
@ -54,6 +54,7 @@ from salt.utils.locales import sdecode
|
|||
import salt.utils.yamlloader as yamlloader
|
||||
|
||||
# Import third party libs
|
||||
import msgpack
|
||||
# pylint: disable=import-error,no-name-in-module,redefined-builtin
|
||||
from salt.ext import six
|
||||
from salt.ext.six.moves import map, range, reload_module
|
||||
|
@ -2156,7 +2157,7 @@ class State(object):
|
|||
tries = 0
|
||||
with salt.utils.files.fopen(pause_path, 'rb') as fp_:
|
||||
try:
|
||||
pdat = msgpack.loads(fp_.read())
|
||||
pdat = msgpack_deserialize(fp_.read())
|
||||
except msgpack.UnpackValueError:
|
||||
# Reading race condition
|
||||
if tries > 10:
|
||||
|
|
Loading…
Add table
Reference in a new issue