diff --git a/cli.py b/cli.py index d292877..bb2173b 100755 --- a/cli.py +++ b/cli.py @@ -110,6 +110,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__': diff --git a/dev-cli.py b/dev-cli.py index 7d271dd..e78ba5e 100755 --- a/dev-cli.py +++ b/dev-cli.py @@ -110,6 +110,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__': diff --git a/generated_templates/managed-django-project/your_cool_package/manage.py b/generated_templates/managed-django-project/your_cool_package/manage.py index 07ebbfd..80707f2 100755 --- a/generated_templates/managed-django-project/your_cool_package/manage.py +++ b/generated_templates/managed-django-project/your_cool_package/manage.py @@ -120,6 +120,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__': diff --git a/generated_templates/piptools-python/your_cool_package/cli.py b/generated_templates/piptools-python/your_cool_package/cli.py index 024ae96..bd44505 100755 --- a/generated_templates/piptools-python/your_cool_package/cli.py +++ b/generated_templates/piptools-python/your_cool_package/cli.py @@ -110,6 +110,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__': diff --git a/generated_templates/piptools-python/your_cool_package/dev-cli.py b/generated_templates/piptools-python/your_cool_package/dev-cli.py index 4359263..f91a54b 100755 --- a/generated_templates/piptools-python/your_cool_package/dev-cli.py +++ b/generated_templates/piptools-python/your_cool_package/dev-cli.py @@ -110,6 +110,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__': diff --git a/generated_templates/yunohost_django_package/django_example_ynh/dev-cli.py b/generated_templates/yunohost_django_package/django_example_ynh/dev-cli.py index 4a17389..1d64254 100644 --- a/generated_templates/yunohost_django_package/django_example_ynh/dev-cli.py +++ b/generated_templates/yunohost_django_package/django_example_ynh/dev-cli.py @@ -110,6 +110,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__': diff --git a/managed-django-project/{{ cookiecutter.package_name }}/manage.py b/managed-django-project/{{ cookiecutter.package_name }}/manage.py index feccb36..bcda08e 100755 --- a/managed-django-project/{{ cookiecutter.package_name }}/manage.py +++ b/managed-django-project/{{ cookiecutter.package_name }}/manage.py @@ -120,6 +120,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__': diff --git a/piptools-python/{{ cookiecutter.package_name }}/cli.py b/piptools-python/{{ cookiecutter.package_name }}/cli.py index 3f9564e..6953e49 100755 --- a/piptools-python/{{ cookiecutter.package_name }}/cli.py +++ b/piptools-python/{{ cookiecutter.package_name }}/cli.py @@ -110,6 +110,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__': diff --git a/piptools-python/{{ cookiecutter.package_name }}/dev-cli.py b/piptools-python/{{ cookiecutter.package_name }}/dev-cli.py index e62a7e0..fc28253 100755 --- a/piptools-python/{{ cookiecutter.package_name }}/dev-cli.py +++ b/piptools-python/{{ cookiecutter.package_name }}/dev-cli.py @@ -110,6 +110,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__': diff --git a/yunohost_django_package/{{ cookiecutter.ynh_app_pkg_name }}/dev-cli.py b/yunohost_django_package/{{ cookiecutter.ynh_app_pkg_name }}/dev-cli.py index 54b0a28..ef5f7b2 100644 --- a/yunohost_django_package/{{ cookiecutter.ynh_app_pkg_name }}/dev-cli.py +++ b/yunohost_django_package/{{ cookiecutter.ynh_app_pkg_name }}/dev-cli.py @@ -110,6 +110,9 @@ def main(argv): verbose_check_call(PROJECT_SHELL_SCRIPT, *argv[1:]) except subprocess.CalledProcessError as err: sys.exit(err.returncode) + except KeyboardInterrupt: + print('Bye!') + sys.exit(130) if __name__ == '__main__':