Skip to content

Commit e92546b

Browse files
authoredDec 12, 2019
Fix python warnings in webidl binder (#10022)
1 parent 51e2b8c commit e92546b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎tools/webidl_binder.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Anything else defaults to legacy mode for backward compatibility.
2929
CHECKS = os.environ.get('IDL_CHECKS') or 'DEFAULT'
3030
# DEBUG=1 will print debug info in render_function
31-
DEBUG = os.environ.get('IDL_VERBOSE') is '1'
31+
DEBUG = os.environ.get('IDL_VERBOSE') == '1'
3232

3333
if DEBUG: print("Debug print ON, CHECKS=%s" % CHECKS)
3434

@@ -525,7 +525,7 @@ def render_function(class_name, func_name, sigs, return_type, non_pointer, copy,
525525

526526
pre = ''
527527

528-
basic_return = 'return ' if constructor or return_type is not 'Void' else ''
528+
basic_return = 'return ' if constructor or return_type != 'Void' else ''
529529
return_prefix = basic_return
530530
return_postfix = ''
531531
if non_pointer:

0 commit comments

Comments
 (0)