diff options
author | Ole André Vadla RavnÄs <oleavr@gmail.com> | 2022-01-31 21:01:51 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-02-04 12:35:04 +0200 |
commit | 02733bc654b273f17597dfaea6bec885ead88e0a (patch) | |
tree | 9ffd6f956748df6a1e39f7b44c20f8c30830daaa /mesonbuild | |
parent | 5ad9e7783854de9844572c00b0d5829ecc4cbb0a (diff) | |
download | meson-02733bc654b273f17597dfaea6bec885ead88e0a.zip meson-02733bc654b273f17597dfaea6bec885ead88e0a.tar.gz meson-02733bc654b273f17597dfaea6bec885ead88e0a.tar.bz2 |
mesonlib: Fix Popen_safe_legacy() stderr assumption
It may be None. This was encountered with radare's build system on
Windows, where symbolextractor.py crashes without any output displayed.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/mesonlib/universal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index 27d1240..e86fb99 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -1416,7 +1416,7 @@ def Popen_safe_legacy(args: T.List[str], write: T.Optional[str] = None, else: o = o.decode(errors='replace').replace('\r\n', '\n') if e is not None: - if sys.stderr.encoding: + if sys.stderr is not None and sys.stderr.encoding: e = e.decode(encoding=sys.stderr.encoding, errors='replace').replace('\r\n', '\n') else: e = e.decode(errors='replace').replace('\r\n', '\n') |