Fix broken eventlisten and small refactor.

This commit is contained in:
Mike Place 2014-04-17 13:30:53 -06:00
parent dff03061c4
commit e93d73d39c

View file

@ -63,14 +63,15 @@ def parse():
return opts
def listen(sock_dir, node, id=None):
#def listen(sock_dir, node):
def listen(opts):
'''
Attach to the pub socket and grab messages
'''
event = salt.utils.event.SaltEvent(
node,
sock_dir,
id=id
opts['node'],
opts['sock_dir'],
opts
)
print(event.puburi)
jid_counter = 0
@ -98,4 +99,4 @@ def listen(sock_dir, node, id=None):
if __name__ == '__main__':
opts = parse()
listen(opts['sock_dir'], opts['node'], id=opts.get('id', ''))
listen(opts)