[PATCH 1/2] Use sys.exit instead of os._exit in the potfiles test
Vratislav Podzimek
vpodzime at redhat.com
Tue Dec 10 07:21:38 UTC 2013
>From Python docs:
os._exit(n)
Exit the process with status n, without calling cleanup handlers, flushing
stdio buffers, etc.
Note
The standard way to exit is sys.exit(n). _exit() should normally only be used in
the child process after a fork().
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
tests/gettext/gettext_potfiles.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/gettext/gettext_potfiles.py b/tests/gettext/gettext_potfiles.py
index 74ec44b..358d7fa 100755
--- a/tests/gettext/gettext_potfiles.py
+++ b/tests/gettext/gettext_potfiles.py
@@ -9,7 +9,7 @@ import xml.etree.ElementTree as ET
if "top_srcdir" not in os.environ:
sys.stderr.write("$top_srcdir must be defined in the test environment\n")
# This return code tells the automake test driver that the test setup failed
- os._exit(99)
+ sys.exit(99)
success = True
@@ -60,4 +60,4 @@ os.chdir(os.environ["top_srcdir"])
os.path.walk(".", check_potfiles, set(POTFILES))
if not success:
- os._exit(1)
+ sys.exit(1)
--
1.8.4.2
More information about the anaconda-patches
mailing list