Merge pull request #55 from marxin/fix-python38-warnings

Fix new Python3.8 warnings:
This commit is contained in:
Markus Opolka 2020-03-12 14:17:34 +01:00 committed by GitHub
commit 4f1d29dc7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,10 +183,10 @@ class JsonHelper:
subElemKey = key[:key.find('(*)')-1] subElemKey = key[:key.find('(*)')-1]
remainingKey = key[key.find('(*)')+3:] remainingKey = key[key.find('(*)')+3:]
elemData = self.get(subElemKey) elemData = self.get(subElemKey)
if elemData is (None, 'not_found'): if elemData == (None, 'not_found'):
keys.append(key) keys.append(key)
return keys return keys
if subElemKey is not '': if subElemKey != '':
subElemKey = subElemKey + '.' subElemKey = subElemKey + '.'
for i in range(len(elemData)): for i in range(len(elemData)):
newKey = subElemKey + '(' + str(i) + ')' + remainingKey newKey = subElemKey + '(' + str(i) + ')' + remainingKey