1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Tabs to spaces

This commit is contained in:
Toshio Kuratomi 2015-02-11 14:05:27 -08:00 committed by Matt Clay
parent 76ee9a6a04
commit 691f4cc049

View file

@ -353,14 +353,14 @@ def enforce_state(module, params):
# if the key is a url, request it and use it as key source
if key.startswith("http"):
try:
try:
resp, info = fetch_url(module, key)
if info['status'] != 200:
if info['status'] != 200:
module.fail_json(msg=error_msg % key)
else:
key = resp.read()
except Exception:
module.fail_json(msg=error_msg % key)
else:
key = resp.read()
except Exception:
module.fail_json(msg=error_msg % key)
# extract individual keys into an array, skipping blank lines and comments
key = [s for s in key.splitlines() if s and not s.startswith('#')]