mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #26714 from jfindlay/pack_except
add exception placeholder for older msgpacks
This commit is contained in:
commit
16d4e0350d
@ -48,6 +48,21 @@ except ImportError:
|
||||
#sys.exit(salt.defaults.exitcodes.EX_GENERIC)
|
||||
|
||||
|
||||
if not hasattr(msgpack, 'exceptions'):
|
||||
class PackValueError(Exception):
|
||||
'''
|
||||
older versions of msgpack do not have PackValueError
|
||||
'''
|
||||
|
||||
class exceptions(object):
|
||||
'''
|
||||
older versions of msgpack do not have an exceptions module
|
||||
'''
|
||||
PackValueError = PackValueError()
|
||||
|
||||
msgpack.exceptions = exceptions()
|
||||
|
||||
|
||||
def package(payload):
|
||||
'''
|
||||
This method for now just wraps msgpack.dumps, but it is here so that
|
||||
|
Loading…
Reference in New Issue
Block a user