]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:subunit: Use ‘is’ to compare variables with singletons
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 17 Aug 2023 01:29:00 +0000 (13:29 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 21 Aug 2023 23:37:29 +0000 (23:37 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/subunit/run.py

index f8adc7722cce5c7cb457c66c10be0eef7282264a..7881db448a855abcefbcdfb984e132ad690b8a4e 100755 (executable)
@@ -598,11 +598,11 @@ class TestProgram(object):
         parser.prog = self.progName
         parser.add_option('-v', '--verbose', dest='verbose', default=False,
                           help='Verbose output', action='store_true')
-        if self.catchbreak != False:
+        if self.catchbreak is not False:
             parser.add_option('-c', '--catch', dest='catchbreak', default=False,
                               help='Catch ctrl-C and display results so far',
                               action='store_true')
-        if self.buffer != False:
+        if self.buffer is not False:
             parser.add_option('-b', '--buffer', dest='buffer', default=False,
                               help='Buffer stdout and stderr during tests',
                               action='store_true')
@@ -666,9 +666,9 @@ class TestProgram(object):
             print (msg)
         usage = {'progName': self.progName, 'catchbreak': '',
                  'buffer': ''}
-        if self.catchbreak != False:
+        if self.catchbreak is not False:
             usage['catchbreak'] = CATCHBREAK
-        if self.buffer != False:
+        if self.buffer is not False:
             usage['buffer'] = BUFFEROUTPUT
         usage_text = self.USAGE % usage
         usage_lines = usage_text.split('\n')