From adc5a7121002389fd6496f577e46028a689ba9f5 Mon Sep 17 00:00:00 2001 From: Andrew Clark IV Date: Tue, 2 May 2023 10:20:16 -0400 Subject: Make sys.stdout check clearer. --- cmd2/rl_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd2/rl_utils.py b/cmd2/rl_utils.py index 8c697715..52feacb9 100644 --- a/cmd2/rl_utils.py +++ b/cmd2/rl_utils.py @@ -70,7 +70,7 @@ if 'pyreadline3' in sys.modules: ) # Check if we are running in a terminal - if sys.stdout and sys.stdout.isatty(): # pragma: no cover + if sys.stdout is not None and sys.stdout.isatty(): # pragma: no cover # noinspection PyPep8Naming,PyUnresolvedReferences def enable_win_vt100(handle: HANDLE) -> bool: """ -- cgit v1.2.1