mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Make lint happier.
This commit is contained in:
parent
62eca9b00b
commit
cdb48126f7
1 changed files with 6 additions and 5 deletions
|
@ -1282,11 +1282,6 @@ class Minion(MinionBase):
|
|||
else:
|
||||
return
|
||||
|
||||
if timeout_handler is None:
|
||||
def timeout_handler(*_):
|
||||
log.info('fire_master failed: master could not be contacted. Request timed out.')
|
||||
return True
|
||||
|
||||
if sync:
|
||||
try:
|
||||
self._send_req_sync(load, timeout)
|
||||
|
@ -1297,6 +1292,12 @@ class Minion(MinionBase):
|
|||
log.info('fire_master failed: {0}'.format(traceback.format_exc()))
|
||||
return False
|
||||
else:
|
||||
if timeout_handler is None:
|
||||
def handle_timeout(*_):
|
||||
log.info('fire_master failed: master could not be contacted. Request timed out.')
|
||||
return True
|
||||
timeout_handler = handle_timeout
|
||||
|
||||
with tornado.stack_context.ExceptionStackContext(timeout_handler):
|
||||
self._send_req_async(load, timeout, callback=lambda f: None) # pylint: disable=unexpected-keyword-arg
|
||||
return True
|
||||
|
|
Loading…
Add table
Reference in a new issue