From 20567c9dd1315a3bb6e31e3963829570fe39b980 Mon Sep 17 00:00:00 2001 From: fandehui Date: Fri, 29 Dec 2023 18:16:48 +0800 Subject: [PATCH] Avoid annoying SystemExit breaks in vscode Signed-off-by: fandehui --- ...annoying-SystemExit-breaks-in-vscode.patch | 24 +++++++++++++++++++ python-pytoml.spec | 6 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 Avoid-annoying-SystemExit-breaks-in-vscode.patch diff --git a/Avoid-annoying-SystemExit-breaks-in-vscode.patch b/Avoid-annoying-SystemExit-breaks-in-vscode.patch new file mode 100644 index 0000000..5b7835b --- /dev/null +++ b/Avoid-annoying-SystemExit-breaks-in-vscode.patch @@ -0,0 +1,24 @@ +From 056ef47a8797334d2af737c910527e4bdf6746ed Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Vejn=C3=A1r?= +Date: Sun, 28 Oct 2018 13:37:00 +0100 +Subject: [PATCH] Avoid annoying SystemExit breaks in vscode + +--- + test/test.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/test/test.py b/test/test.py +index 0884253..21bffd8 100644 +--- a/test/test.py ++++ b/test/test.py +@@ -94,4 +94,6 @@ def _main(): + return 1 if failed or not succeeded else 0 + + if __name__ == '__main__': +- sys.exit(_main()) ++ r = _main() ++ if r: ++ sys.exit(r) +-- +2.27.0 + diff --git a/python-pytoml.spec b/python-pytoml.spec index c51152b..eb6ba83 100644 --- a/python-pytoml.spec +++ b/python-pytoml.spec @@ -2,7 +2,7 @@ Name: python-%{github_name} Version: 0.1.18 -Release: 6 +Release: 7 Summary: Parser for TOML License: MIT URL: https://github.com/avakar/%{github_name} @@ -10,6 +10,7 @@ Source0: https://github.com/avakar/%{github_name}/archive/v%{version}/%{g Patch0: Add-.vscode-and-.pytest_cache-to-.gitignore.patch Patch1: Fix-datetime-serialization.patch Patch2: Reject-invalid-escapes-in-strings.patch +Patch3: Avoid-annoying-SystemExit-breaks-in-vscode.patch BuildArch: noarch %global my_description \ @@ -45,6 +46,9 @@ BuildRequires: python3-setuptools %{python3_sitelib}/%{github_name}/ %changelog +* Fri Dec 29 2023 fandehui - 0.1.18-7 +- Avoid annoying SystemExit breaks in vscode + * Fri Dec 29 2023 fandehui - 0.1.18-6 - Reject invalid escapes in strings