mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Use utility for ZMQ import handling in flo/zero
This commit is contained in:
parent
08dee6f5bd
commit
457ef7d9a5
@ -15,15 +15,13 @@ import errno
|
|||||||
# Import ioflo libs
|
# Import ioflo libs
|
||||||
import ioflo.base.deeding
|
import ioflo.base.deeding
|
||||||
# Import third party libs
|
# Import third party libs
|
||||||
try:
|
from salt.utils.zeromq import zmq
|
||||||
import zmq
|
|
||||||
import salt.master
|
import salt.master
|
||||||
import salt.crypt
|
import salt.crypt
|
||||||
import salt.daemons.masterapi
|
import salt.daemons.masterapi
|
||||||
import salt.payload
|
import salt.payload
|
||||||
HAS_ZMQ = True
|
import salt.utils.stringutils
|
||||||
except ImportError:
|
|
||||||
HAS_ZMQ = False
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -159,7 +157,7 @@ class SaltZmqPublisher(ioflo.base.deeding.Deed):
|
|||||||
'''
|
'''
|
||||||
Set up tracking value(s)
|
Set up tracking value(s)
|
||||||
'''
|
'''
|
||||||
if not HAS_ZMQ:
|
if not zmq:
|
||||||
return
|
return
|
||||||
self.created = False
|
self.created = False
|
||||||
self.serial = salt.payload.Serial(self.opts.value)
|
self.serial = salt.payload.Serial(self.opts.value)
|
||||||
|
Loading…
Reference in New Issue
Block a user