summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-06-15 09:03:38 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-06-15 16:02:07 +0800
commite8f39a0a2408898e8a36e9011705c7a55f115afc (patch)
tree0be3dbef84888e7cb46c4a2c64fa97f18979d8ee
parentf3561115e44cceebc9aecb859ffdfca4ef36cf93 (diff)
downloadgobject-introspection-e8f39a0a2408898e8a36e9011705c7a55f115afc.tar.gz
giscanner/utils.py: Fix on non-UNIX-like platforms
Commit 85b1d70b93211415d975deff6050f1401743e72d changed the null device from the platform-independent os.devnull to the UNIX /dev/null, which broke introspection builds on non-UNIX-like platforms, as /dev/null is a notion that does not exist on those platforms. Fix this by changing back to os.devnull, but still opening it as writable. 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 da848d52..df512d7b 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('/dev/null', 'w'))
+ stdout=open(os.devnull, 'w'))
except (subprocess.CalledProcessError, OSError):
# If libtool's not installed, assume we don't need it
return None