From d490636328e78984af0b80c70a8217c4f9cf9c52 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Tue, 6 Dec 2022 20:29:27 +0000 Subject: [PATCH] utils: Fix pylint warning using-constant-test --- mesonbuild/utils/universal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py index 33c81c6cc..68ea0b7d1 100644 --- a/mesonbuild/utils/universal.py +++ b/mesonbuild/utils/universal.py @@ -1446,7 +1446,7 @@ def Popen_safe_legacy(args: T.List[str], write: T.Optional[str] = None, input_ = write.encode('utf-8') o, e = p.communicate(input_) if o is not None: - if sys.stdout.encoding: + if sys.stdout.encoding is not None: o = o.decode(encoding=sys.stdout.encoding, errors='replace').replace('\r\n', '\n') else: o = o.decode(errors='replace').replace('\r\n', '\n')