Skip to content

Commit 2956d8e

Browse files
authored
Fix exit in ggt.py (KhronosGroup#6137)
Use sys.exit() instead. Fixes: KhronosGroup#6107
1 parent f06e0f3 commit 2956d8e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

utils/ggt.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -943,13 +943,13 @@ def main():
943943

944944
if args.spirv_core_grammar is None:
945945
print('error: missing --spirv-core-grammar ')
946-
exit(1)
946+
sys.exit(1)
947947
if (args.core_tables_body_output is None) and (args.core_tables_header_output is None):
948948
print('error: need at least one of --core-tables-body-output --core-tables-header-output ')
949-
exit(1)
949+
sys.exit(1)
950950
if len(args.extinst) < 1:
951951
print('error: missing --extinst ')
952-
exit(1)
952+
sys.exit(1)
953953

954954
# Load the JSON grammar files.
955955
extinsts = sorted([ExtInst(e) for e in args.extinst], key = lambda e: e.name)
@@ -985,7 +985,7 @@ def main():
985985
make_path_to_file(args.core_tables_header_output)
986986
with open(args.core_tables_header_output, 'w') as f:
987987
f.write('\n'.join(g.header_decls))
988-
exit(0)
988+
sys.exit(0)
989989

990990

991991
if __name__ == '__main__':

0 commit comments

Comments
 (0)