[gdk-pixbuf] Fix exit status of gen-resources.py
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] Fix exit status of gen-resources.py
- Date: Thu, 2 Apr 2020 11:48:08 +0000 (UTC)
commit 37ab8e55bdd202fefc03448497b350a2469d6201
Author: Michael Forney <mforney mforney org>
Date: Thu Jan 9 18:28:22 2020 -0800
Fix exit status of gen-resources.py
If glib-compile-resources did not produce anything on stdout,
gen-resources.py reports success, even if it actually failed. This
can lead to a build error down the line.
Instead, just use os.execvpe after setting up the environment.
build-aux/gen-resources.py | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
---
diff --git a/build-aux/gen-resources.py b/build-aux/gen-resources.py
index 4c182d9cf..3f790b6c9 100644
--- a/build-aux/gen-resources.py
+++ b/build-aux/gen-resources.py
@@ -6,8 +6,6 @@
import argparse
import os
-import subprocess
-import sys
argparser = argparse.ArgumentParser(description='Compile resources')
argparser.add_argument('--pixdata', metavar='PATH', help='Path to gdk-pixbuf-pixdata')
@@ -36,9 +34,4 @@ newenv = os.environ.copy()
newenv['GDK_PIXBUF_PIXDATA'] = args.pixdata
newenv['GDK_PIXBUF_MODULE_FILE'] = args.loaders
-out, err = subprocess.Popen(cmd, env=newenv).communicate()
-if out is None:
- sys.exit(0)
-else:
- print(out)
- sys.exit(1)
+os.execvpe(cmd[0], cmd, newenv)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]