mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #16278 from rallytime/pylinting
Fix pylint on 2014.7
This commit is contained in:
commit
52f59de09b
5 changed files with 12 additions and 12 deletions
|
@ -908,7 +908,7 @@ class Eventer(ioflo.base.deeding.Deed):
|
|||
Register event requests
|
||||
Iterate over the registered event yards and fire!
|
||||
'''
|
||||
while self.event_req.value: # event subscription requests are msg with routes
|
||||
while self.event_req.value: # event subscription requests are msg with routes
|
||||
self._register_event_yard(
|
||||
self.event_req.value.popleft()
|
||||
)
|
||||
|
|
|
@ -24,6 +24,7 @@ from salt.utils.event import tagify
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class KeyCLI(object):
|
||||
'''
|
||||
Manage key CLI operations
|
||||
|
|
|
@ -83,7 +83,7 @@ def fire(data, tag):
|
|||
salt '*' event.fire '{"data":"my event data"}' 'tag'
|
||||
'''
|
||||
try:
|
||||
event = salt.utils.event.get_event('minion', # was __opts__['id']
|
||||
event = salt.utils.event.get_event('minion', # was __opts__['id']
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport'],
|
||||
opts=__opts__,
|
||||
|
|
|
@ -88,7 +88,7 @@ class RAETChannel(Channel):
|
|||
not already setup such as in salt-call to communicate to-from the minion
|
||||
|
||||
'''
|
||||
kind = self.opts.get('__role', '') # application kind 'master', 'minion', etc
|
||||
kind = self.opts.get('__role', '') # application kind 'master', 'minion', etc
|
||||
if not kind:
|
||||
emsg = ("Missing opts['__role']. required to setup RAETChannel.")
|
||||
log.error(emsg + "\n")
|
||||
|
@ -101,14 +101,13 @@ class RAETChannel(Channel):
|
|||
emsg = ("Missing opts['id']. required to setup RAETChannel.")
|
||||
log.error(emsg + "\n")
|
||||
raise ValueError(emsg)
|
||||
lanename = role # add kind later
|
||||
lanename = role # add kind later
|
||||
else:
|
||||
emsg = ("Unsupported application kind '{0}' for RAETChannel "
|
||||
"Raet.".format(self.node))
|
||||
log.error(emsg + '\n')
|
||||
raise ValueError(emsg)
|
||||
|
||||
|
||||
mid = self.opts.get('id', 'master')
|
||||
uid = nacling.uuid(size=18)
|
||||
name = 'channel' + uid
|
||||
|
|
|
@ -32,7 +32,7 @@ class SaltEvent(object):
|
|||
'''
|
||||
Set up the stack and remote yard
|
||||
'''
|
||||
self.node = node # application kind 'master', 'minion', 'syndic', 'call' etc
|
||||
self.node = node # application kind 'master', 'minion', 'syndic', 'call' etc
|
||||
self.sock_dir = sock_dir
|
||||
self.listen = listen
|
||||
if opts is None:
|
||||
|
@ -44,14 +44,14 @@ class SaltEvent(object):
|
|||
if self.node == 'master':
|
||||
lanename = 'master'
|
||||
if self.opts:
|
||||
kind = self.opts.get('__role', '') # opts optional for master
|
||||
kind = self.opts.get('__role', '') # opts optional for master
|
||||
if kind and kind != self.node:
|
||||
emsg = ("Mismatch between node '{}' and kind '{}' in setup "
|
||||
"of SaltEvent on Raet.".format(self.node, kind))
|
||||
emsg = ("Mismatch between node '{0}' and kind '{1}' in setup "
|
||||
"of SaltEvent on Raet.".format(self.node, kind))
|
||||
log.error(emsg + '\n')
|
||||
raise ValueError(emsg)
|
||||
elif self.node == 'minion':
|
||||
role = self.opts.get('id', '') #opts required for minion
|
||||
role = self.opts.get('id', '') # opts required for minion
|
||||
if not role:
|
||||
emsg = ("Missing opts['id'] required by SaltEvent on Raet with "
|
||||
"node kind {0}.".format(self.node))
|
||||
|
@ -59,11 +59,11 @@ class SaltEvent(object):
|
|||
raise ValueError(emsg)
|
||||
kind = self.opts.get('__role', '')
|
||||
if kind != self.node:
|
||||
emsg = ("Mismatch between node '{}' and kind '{}' in setup "
|
||||
emsg = ("Mismatch between node '{0}' and kind '{1}' in setup "
|
||||
"of SaltEvent on Raet.".format(self.node, kind))
|
||||
log.error(emsg + '\n')
|
||||
raise ValueError(emsg)
|
||||
lanename = role # add '_minion'
|
||||
lanename = role # add '_minion'
|
||||
else:
|
||||
emsg = ("Unsupported application node kind '{0}' for SaltEvent "
|
||||
"Raet.".format(self.node))
|
||||
|
|
Loading…
Add table
Reference in a new issue