From 5f643fffb52864c29b1ccad7a83bdd4363942dcd Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 28 Sep 2022 18:41:20 -0700 Subject: [PATCH] Fix cmdline runner when stdout doesn't have columns/rows attributes (#3156) --- tools/python | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python b/tools/python index 2b4aa83dc..d7ada81b3 100755 --- a/tools/python +++ b/tools/python @@ -203,8 +203,8 @@ async function main() { from js.process import stdout import os def get_terminal_size(fallback=(80, 24)): - columns = stdout.columns - rows = stdout.rows + columns = getattr(stdout, "columns", None) + rows = getattr(stdout, "rows", None) if columns is None: columns = fallback[0] if rows is None: