From cd1dc310c711e9abb4a3d6ab0d45c7dc0abddf0b Mon Sep 17 00:00:00 2001 From: gryf Date: Tue, 17 Mar 2026 19:15:59 +0100 Subject: [PATCH] Handle keyboard interruption. --- README.rst | 2 +- box.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index ab19ec0..b2f9517 100644 --- a/README.rst +++ b/README.rst @@ -79,7 +79,7 @@ You'll have ``boxpy`` command created for you as well. .. code:: shell-session $ boxpy -V - boxpy 1.9.2 + boxpy 1.11.3 Other option is simply link it somewhere in the path: diff --git a/box.py b/box.py index 293ffba..3ebed18 100755 --- a/box.py +++ b/box.py @@ -18,7 +18,7 @@ import requests import yaml -__version__ = "1.11.2" +__version__ = "1.11.3" CACHE_DIR = os.environ.get('XDG_CACHE_HOME', os.path.expanduser('~/.cache')) CLOUD_IMAGE = "ci.iso" @@ -1827,4 +1827,7 @@ def main(): if __name__ == '__main__': - sys.exit(main()) + try: + sys.exit(main()) + except KeyboardInterrupt: + sys.exit(50)