From 80b22b4a4c0600b38e3ff9ed3121e8fce3d928c8 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 15 Jun 2017 09:03:38 +0800 Subject: 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 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1