From d2ac31ff2cdfdd5c6415a7e56bd446d054876e3d Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Tue, 28 Sep 2021 17:25:34 +0200 Subject: [PATCH] added compatibility for non screen devices --- scrap_engine.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scrap_engine.py b/scrap_engine.py index 2709b57..376dd04 100755 --- a/scrap_engine.py +++ b/scrap_engine.py @@ -40,7 +40,10 @@ MAXCACHE_LINE = 512 MAXCACHE_FRAME = 64 -screen_width, screen_height = os.get_terminal_size() +try: + screen_width, screen_height = os.get_terminal_size() +except OSError: + screen_width, screen_height = 100, 100 class CoordinateError(Exception): """