From 8a30b71bb39ee16f1961d63685610bc8fd67b13c Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Thu, 31 Jan 2019 15:27:57 -0500 Subject: [PATCH] Fix running tests in environment where opening /dev/tty gives ENXIO It can also throw OSError if system returns ENXIO (No such device or address) --- litecli/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litecli/main.py b/litecli/main.py index e034688..909ebf3 100755 --- a/litecli/main.py +++ b/litecli/main.py @@ -923,7 +923,7 @@ def cli( try: sys.stdin = open("/dev/tty") - except FileNotFoundError: + except (FileNotFoundError, OSError): litecli.logger.warning("Unable to open TTY as stdin.") if (