mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #53235 from saltstack/revert-52934-fix_msgpack
Revert "Update msgpack calls for newer msgpack"
This commit is contained in:
commit
14aeeeaab3
1 changed files with 4 additions and 8 deletions
|
@ -254,15 +254,11 @@ class IPCClient(object):
|
|||
self.socket_path = socket_path
|
||||
self._closing = False
|
||||
self.stream = None
|
||||
# msgpack deprecated `encoding` starting with version 0.5.2
|
||||
if msgpack.version >= (0, 5, 2):
|
||||
msgpack_kwargs = {'raw': False}
|
||||
if six.PY2:
|
||||
encoding = None
|
||||
else:
|
||||
if six.PY2:
|
||||
msgpack_kwargs = {'encoding': None}
|
||||
else:
|
||||
msgpack_kwargs = {'encoding': 'utf-8'}
|
||||
self.unpacker = msgpack.Unpacker(**msgpack_kwargs)
|
||||
encoding = 'utf-8'
|
||||
self.unpacker = msgpack.Unpacker(encoding=encoding)
|
||||
|
||||
def connected(self):
|
||||
return self.stream is not None and not self.stream.closed()
|
||||
|
|
Loading…
Add table
Reference in a new issue