mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-05 16:04:09 -07:00
Fix incorrect use of is
for comparisons.
See https://bugs.python.org/issue34850 for details.
This commit is contained in:
parent
cd7a144515
commit
0a461380a3
21 changed files with 42 additions and 42 deletions
|
@ -601,7 +601,7 @@ class LogicMonitor(object):
|
|||
resp = self.rpc("getAgents", {})
|
||||
resp_json = json.loads(resp)
|
||||
|
||||
if resp_json["status"] is 200:
|
||||
if resp_json["status"] == 200:
|
||||
self.module.debug("RPC call succeeded")
|
||||
return resp_json["data"]
|
||||
else:
|
||||
|
@ -1063,7 +1063,7 @@ class Collector(LogicMonitor):
|
|||
self.module.debug("Making RPC call to 'addAgent'")
|
||||
create = (json.loads(self.rpc("addAgent", h)))
|
||||
|
||||
if create["status"] is 200:
|
||||
if create["status"] == 200:
|
||||
self.module.debug("RPC call succeeded")
|
||||
self.info = create["data"]
|
||||
self.id = create["data"]["id"]
|
||||
|
@ -1100,7 +1100,7 @@ class Collector(LogicMonitor):
|
|||
delete = json.loads(self.rpc("deleteAgent",
|
||||
{"id": self.id}))
|
||||
|
||||
if delete["status"] is 200:
|
||||
if delete["status"] == 200:
|
||||
self.module.debug("RPC call succeeded")
|
||||
return delete
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue