diff --git a/lib/ansible/module_utils/fortios.py b/lib/ansible/module_utils/fortios.py index 661ec499ce3..4ad949bd027 100644 --- a/lib/ansible/module_utils/fortios.py +++ b/lib/ansible/module_utils/fortios.py @@ -162,7 +162,7 @@ class AnsibleFortios(object): try: f = open(self.module.params['config_file'], 'w') f.write(self.candidate_config.to_text()) - f.close + f.close() except IOError: e = get_exception() self.module.fail_json(msg='Error writing configuration file. %s' % e)