mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix incorrect logic in exception check
This commit is contained in:
parent
fed5041c5f
commit
6ba66cca41
1 changed files with 5 additions and 6 deletions
|
@ -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…
Add table
Reference in a new issue