mirror of
https://github.com/clearml/wexpect-venv
synced 2025-01-31 02:46:59 +00:00
[FIX] add EOF exception into switchto
This commit is contained in:
parent
8f1aeb7da8
commit
0b1dec9535
11
appveyor.yml
11
appveyor.yml
@ -39,9 +39,10 @@ after_test:
|
||||
# Create source distribution.
|
||||
- python -m setup sdist
|
||||
|
||||
# Upload to test pypi
|
||||
- twine upload -r testpypi dist\\wexpect*.tar.gz
|
||||
|
||||
# Upload to offitial pypi
|
||||
- twine upload -r pypi dist\\wexpect*.tar.gz
|
||||
# Upload to pypi.
|
||||
# More precisely. Upload pypi the master builds, and to test-pypi any other builds.
|
||||
- git branch | find "* master" > NUL & IF ERRORLEVEL 1 ( \
|
||||
twine upload -r testpypi dist\\wexpect*.tar.gz \
|
||||
) ELSE ( \
|
||||
twine upload -r pypi dist\\wexpect*.tar.gz )
|
||||
|
@ -2064,6 +2064,15 @@ class Wtty:
|
||||
win32console.AttachConsole(self.conpid)
|
||||
self.__consin = win32console.GetStdHandle(win32console.STD_INPUT_HANDLE)
|
||||
self.__consout = self.getConsoleOut()
|
||||
|
||||
except pywintypes.error as e:
|
||||
# pywintypes.error: (5, 'AttachConsole', 'Access is denied.')
|
||||
# When child has finished...
|
||||
logging.info(e)
|
||||
# In case of any error: We "switch back" (attach) our original console, then raise the
|
||||
# error.
|
||||
win32console.AttachConsole(self.__parentPid)
|
||||
raise EOF('End Of File (EOF) in switchTo().')
|
||||
except:
|
||||
# In case of any error: We "switch back" (attach) our original console, then raise the
|
||||
# error.
|
||||
|
Loading…
Reference in New Issue
Block a user