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:
Martin Liska 2020-03-12 09:37:53 +01:00
parent e7cf7ca8fb
commit 404890d918
No known key found for this signature in database
GPG Key ID: 4DC182DC0FA73785

View File

@ -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