From: Joseph Sutton Date: Thu, 17 Aug 2023 01:29:00 +0000 (+1200) Subject: python:subunit: Use ‘is’ to compare variables with singletons X-Git-Tag: tevent-0.16.0~885 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7e006801021209a95b1811ca1e236bbcac8b4df;p=thirdparty%2Fsamba.git python:subunit: Use ‘is’ to compare variables with singletons Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/subunit/run.py b/python/samba/subunit/run.py index f8adc7722cc..7881db448a8 100755 --- a/python/samba/subunit/run.py +++ b/python/samba/subunit/run.py @@ -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')