add debug

This commit is contained in:
chrys 2018-07-19 22:45:55 +02:00
parent 79d762939e
commit 7f2b722762

View File

@ -4,7 +4,7 @@
# Fenrir TTY screen reader # Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers. # By Chrys, Storm Dragon, and contributers.
import os, struct, sys, pty, tty, termios, shlex, signal, select, pyte, time, fcntl ,getpass import os, struct, sys, pty, tty, termios, shlex, signal, select, pyte, time, fcntl ,getpass,traceback
from fenrirscreenreader.core import debug from fenrirscreenreader.core import debug
from fenrirscreenreader.core.eventData import fenrirEventType from fenrirscreenreader.core.eventData import fenrirEventType
from fenrirscreenreader.core.screenDriver import screenDriver from fenrirscreenreader.core.screenDriver import screenDriver
@ -193,6 +193,9 @@ class driver(screenDriver):
}) })
except Exception as e: # Process died? except Exception as e: # Process died?
self.env['runtime']['debug'].writeDebugOut('Process died' + str(e),debug.debugLevel.ERROR) self.env['runtime']['debug'].writeDebugOut('Process died' + str(e),debug.debugLevel.ERROR)
self.env['runtime']['debug'].writeDebugOut(str(traceback.format_exc()),debug.debugLevel.ERROR)
active.value = False active.value = False
finally: finally:
os.kill(p_pid, signal.SIGTERM) os.kill(p_pid, signal.SIGTERM)