From 03204e7c786367bb3147632362342c31f9e2c899 Mon Sep 17 00:00:00 2001 From: clockback Date: Fri, 15 Sep 2023 07:20:34 +1200 Subject: [PATCH] Update core.py Allowing for screen_shape failure --- codesurvey/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codesurvey/core.py b/codesurvey/core.py index 627419c..d2e86a4 100644 --- a/codesurvey/core.py +++ b/codesurvey/core.py @@ -85,7 +85,7 @@ def get_pbars(self, *, disable_progress: bool, cols = 10 screen_shape = _screen_shape_wrapper() if screen_shape: - cols, _ = screen_shape(sys.stderr) + cols = screen_shape(sys.stderr)[0] or cols bar_format_with_total = '{desc}: {n_fmt}/{total_fmt} [{elapsed}, {rate_fmt}{postfix}]|{bar}| {percentage:3.0f}% [{remaining} remaining]' bar_format_without_total = '{desc}: {n_fmt} [{elapsed}, {rate_fmt}{postfix}]'