Fixes pylint errors (#23279) (#23295)

Reported by gundalow, this fixes pylint errors in F5 modules
(cherry picked from commit 780b2f2c84)
This commit is contained in:
John R Barker 2017-04-05 14:49:01 +01:00 committed by GitHub
parent dbe83cc099
commit ac9bb4df8e
3 changed files with 9 additions and 13 deletions

View file

@ -320,7 +320,7 @@ class BigIpGtmDatacenter(object):
enabled = self.params['enabled']
if state is None and enabled is None:
module.fail_json(msg="Neither 'state' nor 'enabled' set")
raise F5ModuleError("Neither 'state' nor 'enabled' set")
try:
if state == "present":

View file

@ -476,18 +476,12 @@ class BigIpRouteDomain(object):
result = dict()
state = self.params['state']
if self.params['check_mode']:
if value == current:
changed = False
else:
changed = True
else:
if state == "present":
changed = self.present()
current = self.read()
result.update(current)
elif state == "absent":
changed = self.absent()
if state == "present":
changed = self.present()
current = self.read()
result.update(current)
elif state == "absent":
changed = self.absent()
result.update(dict(changed=changed))
return result

View file

@ -444,6 +444,8 @@ class BigIpSslCertificate(object):
def delete(self):
changed = False
name = self.params['name']
partition = self.params['partition']
check_mode = self.params['check_mode']