Add some self

This commit is contained in:
Thomas S Hatch 2011-12-13 21:32:52 -07:00
parent 8b025bb661
commit 16bb1d8f3a
2 changed files with 5 additions and 5 deletions

View File

@ -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:

View File

@ -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
'''