Skip to content

Commit c0b5075

Browse files
authored
fix(gazelle): Explicitly call sys.exit in the modules_mapping generator (#2662)
When running python with `-S` to disable the `site` module, `exit` isn't implicitly imported and you need to explicitly call `sys.exit` instead. Seems to be a remnant of the REPL
1 parent 389431b commit c0b5075

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gazelle/modules_mapping/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,4 @@ def data_has_purelib_or_platlib(path):
164164
generator = Generator(
165165
sys.stderr, args.output_file, args.exclude_patterns, args.include_stub_packages
166166
)
167-
exit(generator.run(args.wheels))
167+
sys.exit(generator.run(args.wheels))

0 commit comments

Comments
 (0)