mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Fix incorrect logic in exception check
This commit is contained in:
parent
fed5041c5f
commit
6ba66cca41
@ -567,13 +567,12 @@ class MinionBase(object):
|
||||
break
|
||||
except SaltClientError as exc:
|
||||
last_exc = exc
|
||||
pki_dirname = os.path.dirname(opts['pki_dir'])
|
||||
if exc.strerror.startswith(
|
||||
if exc.strerror.startswith('Could not access'):
|
||||
msg = (
|
||||
'Failed to initiate connection with Master '
|
||||
'{0} because the Minion could not access {1}. '
|
||||
'Check ownership/permissions'.format(
|
||||
opts['master'], pki_dirname)):
|
||||
msg = exc.strerror
|
||||
'{0}: check ownership/permissions. Error '
|
||||
'message: {1}'.format(opts['master'], exc)
|
||||
)
|
||||
else:
|
||||
msg = ('Master {0} could not be reached, trying '
|
||||
'next master (if any)'.format(opts['master']))
|
||||
|
Loading…
Reference in New Issue
Block a user