From 3b9d1facdba73b32b1140267bcd85c3b6e345e01 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Sat, 28 Sep 2024 14:09:14 +0100 Subject: [PATCH] Fix ``TypeError: 'NoneType' object is not iterable`` --- build_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_docs.py b/build_docs.py index 861eace..a6e82ff 100755 --- a/build_docs.py +++ b/build_docs.py @@ -248,7 +248,7 @@ def run_with_logging(cmd, cwd=None): logging.debug("Run: %s", shlex.join(cmd)) with subprocess.Popen(cmd, cwd=cwd, encoding="utf-8") as p: try: - for line in p.stdout: + for line in (p.stdout or ()): logging.debug(">>>> %s", line.rstrip()) except: p.kill()