From 5655f766f04dae0f755d0bdbb0cc7d511240ad24 Mon Sep 17 00:00:00 2001 From: sean-m-sullivan Date: Sat, 10 Oct 2020 11:56:00 -0500 Subject: [PATCH] linting --- awx_collection/plugins/module_utils/tower_api.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/awx_collection/plugins/module_utils/tower_api.py b/awx_collection/plugins/module_utils/tower_api.py index 2e03abbb1f..4c180cead7 100644 --- a/awx_collection/plugins/module_utils/tower_api.py +++ b/awx_collection/plugins/module_utils/tower_api.py @@ -336,7 +336,7 @@ class TowerAPIModule(TowerModule): # If we have neither of these, then we can try un-authenticated access self.authenticated = True - + def delete_if_needed(self, existing_item, on_delete=None, on_continue=None): # This will exit from the module on its own. # If the method successfully deletes an item and on_delete param is defined, @@ -411,7 +411,7 @@ class TowerAPIModule(TowerModule): self.fail_json(msg="Failed to associate item {0}".format(response['json']['detail'])) def create_if_needed(self, existing_item, new_item, endpoint, on_create=None, on_continue=None, item_type='unknown', associations=None): - + # This will exit from the module on its own # If the method successfully creates an item and on_create param is defined, # the on_create parameter will be called as a method pasing in this object and the json from the response @@ -437,7 +437,7 @@ class TowerAPIModule(TowerModule): item_name = self.get_item_name(new_item, allow_unknown=True) response = self.post_endpoint(endpoint, **{'data': new_item}) - + if response['status_code'] == 201: self.json_output['name'] = 'unknown' for key in ('name', 'username', 'identifier', 'hostname'): @@ -447,7 +447,7 @@ class TowerAPIModule(TowerModule): self.json_output['changed'] = True item_url = response['json']['url'] # 200 is response from approval node creation - elif response['status_code'] == 200 and item_type == 'workflow_job_template_approval_node': + elif response['status_code'] == 200 and item_type == 'workflow_job_template_approval_node': self.json_output['name'] = 'unknown' for key in ('name', 'username', 'identifier', 'hostname'): if key in response['json']: @@ -606,7 +606,7 @@ class TowerAPIModule(TowerModule): return last_data else: self.exit_json(**self.json_output) - + def create_or_update_if_needed(self, existing_item, new_item, endpoint=None, item_type='unknown', on_create=None, on_update=None, on_continue=None, associations=None): if existing_item: return self.update_if_needed(existing_item, new_item, on_update=on_update, on_continue=on_continue, associations=associations)