mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-22 00:31:14 +00:00
Minor style change: removed unnecessary dictionary
This commit is contained in:
@@ -92,19 +92,19 @@ class OVSBridge(object):
|
||||
|
||||
def run(self):
|
||||
'''Make the necessary changes'''
|
||||
result = {'changed': False}
|
||||
changed = False
|
||||
try:
|
||||
if self.state == 'absent':
|
||||
if self.exists():
|
||||
self.delete()
|
||||
result['changed'] = True
|
||||
changed = True
|
||||
elif self.state == 'present':
|
||||
if not self.exists():
|
||||
self.add()
|
||||
result['changed'] = True
|
||||
changed = True
|
||||
except Exception, e:
|
||||
self.module.fail_json(msg=str(e))
|
||||
self.module.exit_json(**result)
|
||||
self.module.exit_json(changed=changed)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -95,19 +95,19 @@ class OVSPort(object):
|
||||
|
||||
def run(self):
|
||||
'''Make the necessary changes'''
|
||||
result = {'changed': False}
|
||||
changed = False
|
||||
try:
|
||||
if self.state == 'absent':
|
||||
if self.exists():
|
||||
self.delete()
|
||||
result['changed'] = True
|
||||
changed = True
|
||||
elif self.state == 'present':
|
||||
if not self.exists():
|
||||
self.add()
|
||||
result['changed'] = True
|
||||
changed = True
|
||||
except Exception, e:
|
||||
self.module.fail_json(msg=str(e))
|
||||
self.module.exit_json(**result)
|
||||
self.module.exit_json(changed=changed)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user