[gobject-introspection] giscanner/utils.py: Fix on non-UNIX-like platforms
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner/utils.py: Fix on non-UNIX-like platforms
- Date: Thu, 15 Jun 2017 08:03:17 +0000 (UTC)
commit e8f39a0a2408898e8a36e9011705c7a55f115afc
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Jun 15 09:03:38 2017 +0800
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
giscanner/utils.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/utils.py b/giscanner/utils.py
index da848d5..df512d7 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]