コード例 #1
0
ファイル: payload.py プロジェクト: JustinCarmony/salt
 def dumps(self, msg):
     '''
     Run the correct dumps serialization format
     '''
     if self.serial == 'pickle':
         return pickle.dumps(msg)
     else:
         return msgpack.dumps(msg)
コード例 #2
0
ファイル: payload.py プロジェクト: terminalmage/salt
 def dumps(self, msg):
     '''
     Run the correct dumps serialization format
     '''
     if self.serial == 'pickle':
         return pickle.dumps(msg)
     else:
         return msgpack.dumps(msg)
コード例 #3
0
ファイル: payload.py プロジェクト: JustinCarmony/salt
def package(payload):
    '''
    This method for now just wraps msgpack.dumps, but it is here so that we can
    make the serialization a custom option in the future with ease.
    '''
    return msgpack.dumps(payload)
コード例 #4
0
ファイル: payload.py プロジェクト: terminalmage/salt
def package(payload):
    '''
    This method for now just wraps msgpack.dumps, but it is here so that we can
    make the serialization a custom option in the future with ease.
    '''
    return msgpack.dumps(payload)