summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2017-04-14 13:02:35 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2017-04-25 14:18:04 +0200
commit59cfb35a2d4eecc1c4a8efb66da539a6314262b5 (patch)
treeea792248d1b7301adefcb4ced841eef3c3fe43ad
parent19c504cc10efeb7e102ce469c0ca41d1d4e55fab (diff)
downloadgobject-introspection-59cfb35a2d4eecc1c4a8efb66da539a6314262b5.tar.gz
Fix 'Bad file descriptor' error when checking libtool version
Running g-ir-scanner on Fedora 25 (libtool 2.4.6) produces the following message on stderr, twice: /usr/bin/libtool: line 2460: printf: write error: Bad file descriptor This is because we were redirecting stdout to /dev/null incorrectly -- we were opening /dev/null for reading rather than for writing. https://bugzilla.gnome.org/show_bug.cgi?id=781312
-rw-r--r--giscanner/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/utils.py b/giscanner/utils.py
index aff5393a..da848d52 100644
--- a/giscanner/utils.py
+++ b/giscanner/utils.py
@@ -159,7 +159,7 @@ def get_libtool_command(options):
libtool_cmd = 'glibtool'
try:
subprocess.check_call([libtool_cmd, '--version'],
- stdout=open(os.devnull))
+ stdout=open('/dev/null', 'w'))
except (subprocess.CalledProcessError, OSError):
# If libtool's not installed, assume we don't need it
return None