diff options
author | Michael Forney <mforney@mforney.org> | 2020-01-09 18:28:22 -0800 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2020-04-02 11:23:00 +0000 |
commit | 37ab8e55bdd202fefc03448497b350a2469d6201 (patch) | |
tree | b16e7330a4850a641acf76a64ededa7dd3b98fba /build-aux | |
parent | b22723c24a6e27ba90b170268cb5dd1744461ce0 (diff) | |
download | gdk-pixbuf-37ab8e55bdd202fefc03448497b350a2469d6201.tar.gz |
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.
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/gen-resources.py | 9 |
1 files changed, 1 insertions, 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) |