From: luz paz Date: Thu, 1 Dec 2022 14:18:15 +0000 (-0500) Subject: Fix 'testing equality to None' python issue X-Git-Tag: v9.5.0-rc1~771^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e51949812d300097f0df640ca93f1efd551fbc4;p=dealii.git Fix 'testing equality to None' python issue "Testing whether an object is '`None`' using the `==` operator is inefficient and potentially incorrect." --- diff --git a/contrib/utilities/parse_ctest_output.py b/contrib/utilities/parse_ctest_output.py index fd034c29d4..a11bce618a 100644 --- a/contrib/utilities/parse_ctest_output.py +++ b/contrib/utilities/parse_ctest_output.py @@ -77,7 +77,7 @@ def parse_revision(dirname): status = 4 if fail: text = test.find('Results').find('Measurement').find('Value').text - if text == None: + if text is None: text="" failtext = text.encode('utf-8') failtextlines = failtext.replace('"','').split('\n')