mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #27353 from cachedout/fix_retry_get
Fix case where var not set in config
This commit is contained in:
commit
ac9e6c2532
@ -798,7 +798,7 @@ class Minion(MinionBase):
|
||||
just return the value of the return_retry_timer.
|
||||
'''
|
||||
msg = 'Minion return retry timer set to {0} seconds'
|
||||
if self.opts['return_retry_random']:
|
||||
if self.opts.get('return_retry_random'):
|
||||
try:
|
||||
random_retry = randint(1, self.opts['return_retry_timer'])
|
||||
except ValueError:
|
||||
@ -813,8 +813,8 @@ class Minion(MinionBase):
|
||||
log.debug(msg.format(random_retry) + ' (randomized)')
|
||||
return random_retry
|
||||
else:
|
||||
log.debug(msg.format(self.opts['return_retry_timer']))
|
||||
return self.opts['return_retry_timer']
|
||||
log.debug(msg.format(self.opts.get('return_retry_timer')))
|
||||
return self.opts.get('return_retry_timer')
|
||||
|
||||
def _prep_mod_opts(self):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user