Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: js2c.py use ==/!= to compare str, bytes, and int literals #26979

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/js2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down