1
0
mirror of https://github.com/gryf/boxpy.git synced 2026-03-19 02:23:34 +01:00

Handle keyboard interruption.

This commit is contained in:
2026-03-17 19:15:59 +01:00
parent 295fb59101
commit cd1dc310c7
2 changed files with 6 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ You'll have ``boxpy`` command created for you as well.
.. code:: shell-session .. code:: shell-session
$ boxpy -V $ boxpy -V
boxpy 1.9.2 boxpy 1.11.3
Other option is simply link it somewhere in the path: Other option is simply link it somewhere in the path:

7
box.py
View File

@@ -18,7 +18,7 @@ import requests
import yaml import yaml
__version__ = "1.11.2" __version__ = "1.11.3"
CACHE_DIR = os.environ.get('XDG_CACHE_HOME', os.path.expanduser('~/.cache')) CACHE_DIR = os.environ.get('XDG_CACHE_HOME', os.path.expanduser('~/.cache'))
CLOUD_IMAGE = "ci.iso" CLOUD_IMAGE = "ci.iso"
@@ -1827,4 +1827,7 @@ def main():
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(main()) try:
sys.exit(main())
except KeyboardInterrupt:
sys.exit(50)