mirror of
https://github.com/clearml/wexpect-venv
synced 2025-06-26 18:15:52 +00:00
starting new branch for issue #8; [FIX] removing handling of non-handled exception from switchTo()
This commit is contained in:
parent
2c978c6564
commit
8f1aeb7da8
23
wexpect.py
23
wexpect.py
@ -2064,22 +2064,13 @@ class Wtty:
|
||||
win32console.AttachConsole(self.conpid)
|
||||
self.__consin = win32console.GetStdHandle(win32console.STD_INPUT_HANDLE)
|
||||
self.__consout = self.getConsoleOut()
|
||||
except Exception as e:
|
||||
#e = traceback.format_exc()
|
||||
try:
|
||||
win32console.AttachConsole(self.__parentPid)
|
||||
except Exception as ex:
|
||||
pass
|
||||
#log(e)
|
||||
#log(ex)
|
||||
return
|
||||
#self.__consin = None
|
||||
#self.__consout = None
|
||||
#raise e
|
||||
|
||||
|
||||
|
||||
|
||||
except:
|
||||
# In case of any error: We "switch back" (attach) our original console, then raise the
|
||||
# error.
|
||||
win32console.AttachConsole(self.__parentPid)
|
||||
raise
|
||||
|
||||
|
||||
def switchBack(self):
|
||||
"""Releases from the current console and attaches
|
||||
to the parents."""
|
||||
|
Loading…
Reference in New Issue
Block a user