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.base.deeding
|
||||
# Import third party libs
|
||||
try:
|
||||
import zmq
|
||||
from salt.utils.zeromq import zmq
|
||||
import salt.master
|
||||
import salt.crypt
|
||||
import salt.daemons.masterapi
|
||||
import salt.payload
|
||||
HAS_ZMQ = True
|
||||
except ImportError:
|
||||
HAS_ZMQ = False
|
||||
import salt.utils.stringutils
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -159,7 +157,7 @@ class SaltZmqPublisher(ioflo.base.deeding.Deed):
|
||||
'''
|
||||
Set up tracking value(s)
|
||||
'''
|
||||
if not HAS_ZMQ:
|
||||
if not zmq:
|
||||
return
|
||||
self.created = False
|
||||
self.serial = salt.payload.Serial(self.opts.value)
|
||||
|
Loading…
Reference in New Issue
Block a user