mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Lint fixes
This commit is contained in:
parent
55f7ab1fba
commit
4d75b817af
@ -242,7 +242,7 @@ def get_hash(name, password=None):
|
||||
cmd = 'security find-certificate -c "{0}" -m -p'.format(name)
|
||||
|
||||
out = __salt__['cmd.run'](cmd)
|
||||
matches = re.search('-----BEGIN CERTIFICATE-----(.*)-----END CERTIFICATE-----', out, re.DOTALL|re.MULTILINE)
|
||||
matches = re.search('-----BEGIN CERTIFICATE-----(.*)-----END CERTIFICATE-----', out, re.DOTALL | re.MULTILINE)
|
||||
if matches:
|
||||
return matches.group(1)
|
||||
else:
|
||||
|
@ -75,8 +75,7 @@ def installed(name, password, keychain="/Library/Keychains/System.keychain", **k
|
||||
out = __salt__['keychain.uninstall'](friendly_name, keychain,
|
||||
keychain_password=kwargs.get('keychain_password'))
|
||||
if "unable" not in out:
|
||||
ret['comment'] += "Found a certificate with the same name but different hash, removing it.\n".\
|
||||
format(friendly_name)
|
||||
ret['comment'] += "Found a certificate with the same name but different hash, removing it.\n"
|
||||
ret['changes']['uninstalled'] = friendly_name
|
||||
|
||||
# Reset the certs found
|
||||
|
Loading…
Reference in New Issue
Block a user