Stand up a new channel if using salt-call

Refs #26411
This commit is contained in:
Mike Place 2015-10-23 13:03:43 -06:00
parent 909fa3dc97
commit 29e9533aab

View file

@ -51,16 +51,17 @@ def fire_master(data, tag, preload=None):
pass
return True
if preload:
if preload or __opts__.get('__cli') == 'salt-call':
# If preload is specified, we must send a raw event (this is
# slower because it has to independently authenticate)
load = preload
auth = salt.crypt.SAuth(__opts__)
load.update({'id': __opts__['id'],
'tag': tag,
'data': data,
'tok': auth.gen_token('salt'),
'cmd': '_minion_event'})
if preload:
load = preload
auth = salt.crypt.SAuth(__opts__)
load.update({'id': __opts__['id'],
'tag': tag,
'data': data,
'tok': auth.gen_token('salt'),
'cmd': '_minion_event'})
channel = salt.transport.Channel.factory(__opts__)
try: