mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Add some self
This commit is contained in:
parent
8b025bb661
commit
16bb1d8f3a
@ -188,7 +188,7 @@ class Auth(object):
|
||||
context = zmq.Context()
|
||||
socket = context.socket(zmq.REQ)
|
||||
socket.connect(self.opts['master_uri'])
|
||||
payload = self.serial.package(self.minion_sign_in_payload())
|
||||
payload = self.serial.dumps(self.minion_sign_in_payload())
|
||||
socket.send(payload)
|
||||
payload = self.serial.unpackage(socket.recv())
|
||||
if 'load' in payload:
|
||||
|
@ -44,7 +44,7 @@ class Serial(object):
|
||||
self.opts = opts
|
||||
self.serial = self.opts.get('serial', 'msgpack')
|
||||
|
||||
def loads(msg):
|
||||
def loads(self, msg):
|
||||
'''
|
||||
Run the correct loads serialization format
|
||||
'''
|
||||
@ -56,14 +56,14 @@ class Serial(object):
|
||||
except:
|
||||
return msgpack.loads(msg)
|
||||
|
||||
def load(fn_):
|
||||
def load(self, fn_):
|
||||
'''
|
||||
Run the correct serialization to load a file
|
||||
'''
|
||||
data = fn_.read()
|
||||
return self.loads(data)
|
||||
|
||||
def dumps(msg):
|
||||
def dumps(self, msg):
|
||||
'''
|
||||
Run the correct dums serialization format
|
||||
'''
|
||||
@ -72,7 +72,7 @@ class Serial(object):
|
||||
else:
|
||||
return msgpack.dumps(msg)
|
||||
|
||||
def dump(msg, fn_):
|
||||
def dump(self, msg, fn_):
|
||||
'''
|
||||
Serialize the correct data into the named file object
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user