mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
PEP 8 whitespace cleanup. (#20783)
* PEP 8 E271 whitespace cleanup. * PEP 8 W293 whitespace cleanup. * Fix whitespace issue from recent PR.
This commit is contained in:
@@ -121,12 +121,12 @@ def build_url(name, apiid, action, meter_id=None, cert_type=None):
|
||||
elif action == "certificates":
|
||||
return "https://%s/%s/meters/%s/%s.pem" % (api_host, apiid, meter_id, cert_type)
|
||||
elif action == "tags":
|
||||
return "https://%s/%s/meters/%s/tags" % (api_host, apiid, meter_id)
|
||||
return "https://%s/%s/meters/%s/tags" % (api_host, apiid, meter_id)
|
||||
elif action == "delete":
|
||||
return "https://%s/%s/meters/%s" % (api_host, apiid, meter_id)
|
||||
return "https://%s/%s/meters/%s" % (api_host, apiid, meter_id)
|
||||
|
||||
def http_request(module, name, apiid, apikey, action, data=None, meter_id=None, cert_type=None):
|
||||
|
||||
|
||||
if meter_id is None:
|
||||
url = build_url(name, apiid, action)
|
||||
else:
|
||||
|
||||
@@ -123,7 +123,7 @@ def main():
|
||||
params["application_id"] = module.params["application_id"]
|
||||
else:
|
||||
module.fail_json(msg="you must set one of 'app_name' or 'application_id'")
|
||||
|
||||
|
||||
for item in [ "changelog", "description", "revision", "user", "appname", "environment" ]:
|
||||
if module.params[item]:
|
||||
params[item] = module.params[item]
|
||||
|
||||
@@ -209,7 +209,7 @@ def create(module, name, user, passwd, token, requester_id, service, hours, minu
|
||||
'Content-Type' : 'application/json',
|
||||
}
|
||||
request_data = {'maintenance_window': {'start_time': start, 'end_time': end, 'description': desc, 'service_ids': service}}
|
||||
|
||||
|
||||
if requester_id:
|
||||
request_data['requester_id'] = requester_id
|
||||
else:
|
||||
@@ -235,7 +235,7 @@ def absent(module, name, user, passwd, token, requester_id, service):
|
||||
'Content-Type' : 'application/json',
|
||||
}
|
||||
request_data = {}
|
||||
|
||||
|
||||
if requester_id:
|
||||
request_data['requester_id'] = requester_id
|
||||
else:
|
||||
|
||||
@@ -376,10 +376,10 @@ class Host(object):
|
||||
|
||||
if host['proxy_hostid'] != proxy_id:
|
||||
return True
|
||||
|
||||
|
||||
if host['name'] != visible_name:
|
||||
return True
|
||||
|
||||
|
||||
return False
|
||||
|
||||
# link or clear template of the host
|
||||
|
||||
Reference in New Issue
Block a user