diff --git a/tools/js2c.py b/tools/js2c.py index eff44940c57ec6..d255010ad011fc 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -149,7 +149,7 @@ def ReadMacros(lines): hash = line.find('#') if hash != -1: line = line[:hash] line = line.strip() - if len(line) is 0: continue + if len(line) == 0: continue const_match = CONST_PATTERN.match(line) if const_match: name = const_match.group(1) diff --git a/tools/test.py b/tools/test.py index cb501637b8d524..19db5fdeaec41a 100755 --- a/tools/test.py +++ b/tools/test.py @@ -355,7 +355,7 @@ def HasRun(self, output): logger.info(' ---') logger.info(' duration_ms: %d.%d' % (total_seconds, duration.microseconds / 1000)) - if self.severity is not 'ok' or self.traceback is not '': + if self.severity != 'ok' or self.traceback != '': if output.HasTimedOut(): self.traceback = 'timeout\n' + output.output.stdout + output.output.stderr self._printDiagnostic() @@ -1641,7 +1641,7 @@ def Main(): continue archEngineContext = Execute([vm, "-p", "process.arch"], context) vmArch = archEngineContext.stdout.rstrip() - if archEngineContext.exit_code is not 0 or vmArch == "undefined": + if archEngineContext.exit_code != 0 or vmArch == "undefined": print("Can't determine the arch of: '%s'" % vm) print(archEngineContext.stderr.rstrip()) continue