mirror of
https://github.com/drewkerrigan/nagios-http-json.git
synced 2024-11-25 03:43:50 +01:00
Fix new Python3.8 warnings:
./check_http_json.py:186: SyntaxWarning: "is" with a literal. Did you mean "=="? if elemData is (None, 'not_found'): ./check_http_json.py:189: SyntaxWarning: "is not" with a literal. Did you mean "!="? if subElemKey is not '':
This commit is contained in:
parent
e7cf7ca8fb
commit
404890d918
@ -183,10 +183,10 @@ class JsonHelper:
|
||||
subElemKey = key[:key.find('(*)')-1]
|
||||
remainingKey = key[key.find('(*)')+3:]
|
||||
elemData = self.get(subElemKey)
|
||||
if elemData is (None, 'not_found'):
|
||||
if elemData == (None, 'not_found'):
|
||||
keys.append(key)
|
||||
return keys
|
||||
if subElemKey is not '':
|
||||
if subElemKey != '':
|
||||
subElemKey = subElemKey + '.'
|
||||
for i in range(len(elemData)):
|
||||
newKey = subElemKey + '(' + str(i) + ')' + remainingKey
|
||||
|
Loading…
Reference in New Issue
Block a user