summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraiuto <aiuto@google.com>2024-03-28 10:34:38 -0400
committerYifan Hong <elsk@google.com>2024-04-04 16:26:00 -0700
commit17b4888d4d2a50ed2ab6c30eaa4c2a449e4c59a3 (patch)
tree688a68141052f3df8c1426fe9c27a34da08fcfa2
parent429887dfd8db834498ad95e99043f771a3882af0 (diff)
downloadbazelbuild-rules_pkg-17b4888d4d2a50ed2ab6c30eaa4c2a449e4c59a3.tar.gz
use sys.exit() instead of exit() (#844)
This is a cherry-pick of an upstream change. The hermetic Python toolchain that Kleaf uses does not have the exit builtin. To use pkg_install(), temporarily cherry-pick this change. Bug: 324907235 Change-Id: Ie5c73b0a11e5158295c6cff25d4e7950663f4b24 (cherry picked from commit e14245aa9653b462f60a9f202d25fd5956983e03)
-rw-r--r--pkg/filter_directory.py2
-rw-r--r--pkg/private/install.py.tpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/filter_directory.py b/pkg/filter_directory.py
index 8342424..49b2036 100644
--- a/pkg/filter_directory.py
+++ b/pkg/filter_directory.py
@@ -282,4 +282,4 @@ def main(argv):
if __name__ == "__main__":
- exit(main(sys.argv[1:]))
+ sys.exit(main(sys.argv[1:]))
diff --git a/pkg/private/install.py.tpl b/pkg/private/install.py.tpl
index 612908a..6cb99b4 100644
--- a/pkg/private/install.py.tpl
+++ b/pkg/private/install.py.tpl
@@ -200,4 +200,4 @@ def main(args):
if __name__ == "__main__":
- exit(main(sys.argv))
+ sys.exit(main(sys.argv))