From de92aa33b2cb0d184dc32279bb0d66ffa95c7dd2 Mon Sep 17 00:00:00 2001 From: Chrys Date: Tue, 13 Aug 2019 01:09:09 +0200 Subject: [PATCH] fix term environ --- src/fenrirscreenreader/screenDriver/ptyDriver.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/screenDriver/ptyDriver.py b/src/fenrirscreenreader/screenDriver/ptyDriver.py index 314abaf3..b59c34ae 100644 --- a/src/fenrirscreenreader/screenDriver/ptyDriver.py +++ b/src/fenrirscreenreader/screenDriver/ptyDriver.py @@ -125,7 +125,12 @@ class driver(screenDriver): argv = shlex.split(command) env = os.environ.copy() #values are VT100,xterm-256color,linux - env["TERM"] = 'linux' + try: + eterm = env["TERM"] + if eterm == '': + env["TERM"] = 'linux' + except: + env["TERM"] = 'linux' os.execvpe(argv[0], argv, env) # File-like object for I/O with the child process aka command. p_out = os.fdopen(master_fd, "w+b", 0)