From 83ad1231b865f309c70a8ecd773f3c427923f513 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 16 Dec 2019 17:25:08 -0500 Subject: [PATCH] Remove unused variable in resetconf_config.py (#65892) Our flake8 jobs for ansible.netcommon exposed this issue. Signed-off-by: Paul Belanger --- lib/ansible/modules/network/restconf/restconf_config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/network/restconf/restconf_config.py b/lib/ansible/modules/network/restconf/restconf_config.py index e80a5023bef..dcd065caa1e 100644 --- a/lib/ansible/modules/network/restconf/restconf_config.py +++ b/lib/ansible/modules/network/restconf/restconf_config.py @@ -148,7 +148,6 @@ def main(): result = {'changed': False, 'warnings': warnings} running = None - response = None commit = not module.check_mode try: running = restconf.get(module, path, output=format) @@ -162,7 +161,7 @@ def main(): if method == 'delete': if running: if commit: - response = restconf.edit_config(module, path=path, method='DELETE') + restconf.edit_config(module, path=path, method='DELETE') result['changed'] = True else: warnings.append("delete not executed as resource '%s' does not exist" % path) @@ -182,7 +181,7 @@ def main(): result['diff'] = {'prepared': diff, 'before': candidate, 'after': running} if commit: - response = restconf.edit_config(module, path=path, content=diff, method=method.upper(), format=format) + restconf.edit_config(module, path=path, content=diff, method=method.upper(), format=format) result['changed'] = True except ConnectionError as exc: