Lint fixes

This commit is contained in:
Daniel Hobley 2016-03-14 09:32:45 +01:00
parent 55f7ab1fba
commit 4d75b817af
2 changed files with 3 additions and 4 deletions

View File

@ -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:

View File

@ -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