mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-25 01:01:04 +00:00
Fix warning in python script. (#4251)
This commit is contained in:
parent
9f23457eef
commit
1b8341b8b1
@ -130,7 +130,7 @@ def insert_copyright(author, glob, comment_prefix):
|
||||
update_file = False
|
||||
for line in fileinput.input(file, inplace=1):
|
||||
emit = True
|
||||
if state is 0:
|
||||
if state == 0:
|
||||
if COPYRIGHT_RE.search(line):
|
||||
state = 1
|
||||
elif skip(line):
|
||||
@ -141,7 +141,7 @@ def insert_copyright(author, glob, comment_prefix):
|
||||
sys.stdout.write(licensed)
|
||||
# Assume there isn't a previous license notice.
|
||||
state = 1
|
||||
elif state is 1:
|
||||
elif state == 1:
|
||||
if MIT_BEGIN_RE.search(line):
|
||||
state = 2
|
||||
emit = False
|
||||
@ -149,7 +149,7 @@ def insert_copyright(author, glob, comment_prefix):
|
||||
# Assume an Apache license is preceded by a copyright
|
||||
# notice. So just emit it like the rest of the file.
|
||||
state = 9
|
||||
elif state is 2:
|
||||
elif state == 2:
|
||||
# Replace the MIT license with Apache 2
|
||||
emit = False
|
||||
if MIT_END_RE.search(line):
|
||||
|
Loading…
Reference in New Issue
Block a user