From cc8e80e03f689ea32341ae2b575a7b015cd1e19b Mon Sep 17 00:00:00 2001 From: Matthias Schmieder Date: Sat, 27 May 2017 08:56:31 +0200 Subject: [PATCH] =?UTF-8?q?removed=20=E2=80=98has=5Fkey=E2=80=99=20functio?= =?UTF-8?q?n=20and=20used=20=E2=80=98in=E2=80=99=20instead=20to=20make=20t?= =?UTF-8?q?he=20code=20python2=20and=20python3=20compatible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htmlreport/cppcheck-htmlreport | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htmlreport/cppcheck-htmlreport b/htmlreport/cppcheck-htmlreport index d43349198..f0085c386 100755 --- a/htmlreport/cppcheck-htmlreport +++ b/htmlreport/cppcheck-htmlreport @@ -340,7 +340,7 @@ class CppCheckHandler(XmlContentHandler): self.versionCppcheck = attributes['version'] if name == 'error': # is there a better solution than this? - if (attributes.has_key('inconclusive') and attributes.has_key('cwe')): + if ('inconclusive' in attributes and 'cwe' in attributes): self.errors.append({ 'file': '', 'line': 0, @@ -351,7 +351,7 @@ class CppCheckHandler(XmlContentHandler): 'inconclusive': attributes['inconclusive'], 'cwe': attributes['cwe'] }) - elif attributes.has_key('inconclusive'): + elif 'inconclusive' in attributes: self.errors.append({ 'file': '', 'line': 0, @@ -361,7 +361,7 @@ class CppCheckHandler(XmlContentHandler): 'verbose': attributes.get('verbose'), 'inconclusive': attributes['inconclusive'] }) - elif attributes.has_key('cwe'): + elif 'cwe' in attributes: self.errors.append({ 'file': '', 'line': 0,