Pep8 fixes for htpasswd (#24230)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-05-03 12:43:32 +05:30 committed by John R Barker
parent 785bc93ff7
commit b6b3f84990
2 changed files with 3 additions and 4 deletions

View file

@ -131,7 +131,7 @@ def present(dest, username, password, crypt_scheme, create, check_mode):
if crypt_scheme in apache_hashes:
context = htpasswd_context
else:
context = CryptContext(schemes = [ crypt_scheme ] + apache_hashes)
context = CryptContext(schemes=[crypt_scheme] + apache_hashes)
if not os.path.exists(dest):
if not create:
raise ValueError('Destination %s does not exist' % dest)
@ -254,7 +254,7 @@ def main():
path = temp.name
f = open(path, "w")
try:
[ f.write(line) for line in lines if line.strip() ]
[f.write(line) for line in lines if line.strip()]
finally:
f.close()
@ -264,7 +264,7 @@ def main():
elif state == 'absent':
if not os.path.exists(path):
module.exit_json(msg="%s not present" % username,
warnings="%s does not exist" % path, changed=False)
warnings="%s does not exist" % path, changed=False)
(msg, changed) = absent(path, username, check_mode)
else:
module.fail_json(msg="Invalid state: %s" % state)

View file

@ -769,7 +769,6 @@ lib/ansible/modules/web_infrastructure/ansible_tower/tower_team.py
lib/ansible/modules/web_infrastructure/ansible_tower/tower_user.py
lib/ansible/modules/web_infrastructure/deploy_helper.py
lib/ansible/modules/web_infrastructure/ejabberd_user.py
lib/ansible/modules/web_infrastructure/htpasswd.py
lib/ansible/modules/web_infrastructure/jboss.py
lib/ansible/modules/web_infrastructure/jira.py
lib/ansible/modules/windows/win_disk_image.py