Avoid annoying SystemExit breaks in vscode

Signed-off-by: fandehui <fandehui@xfusion.com>
This commit is contained in:
fandehui 2023-12-29 18:16:48 +08:00
parent a49e36dc11
commit 20567c9dd1
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From 056ef47a8797334d2af737c910527e4bdf6746ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Vejn=C3=A1r?= <vejnar.martin@gmail.com>
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

View File

@ -2,7 +2,7 @@
Name: python-%{github_name} Name: python-%{github_name}
Version: 0.1.18 Version: 0.1.18
Release: 6 Release: 7
Summary: Parser for TOML Summary: Parser for TOML
License: MIT License: MIT
URL: https://github.com/avakar/%{github_name} 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 Patch0: Add-.vscode-and-.pytest_cache-to-.gitignore.patch
Patch1: Fix-datetime-serialization.patch Patch1: Fix-datetime-serialization.patch
Patch2: Reject-invalid-escapes-in-strings.patch Patch2: Reject-invalid-escapes-in-strings.patch
Patch3: Avoid-annoying-SystemExit-breaks-in-vscode.patch
BuildArch: noarch BuildArch: noarch
%global my_description \ %global my_description \
@ -45,6 +46,9 @@ BuildRequires: python3-setuptools
%{python3_sitelib}/%{github_name}/ %{python3_sitelib}/%{github_name}/
%changelog %changelog
* Fri Dec 29 2023 fandehui <fandehui@xfusion.com> - 0.1.18-7
- Avoid annoying SystemExit breaks in vscode
* Fri Dec 29 2023 fandehui <fandehui@xfusion.com> - 0.1.18-6 * Fri Dec 29 2023 fandehui <fandehui@xfusion.com> - 0.1.18-6
- Reject invalid escapes in strings - Reject invalid escapes in strings