mirror of
https://github.com/clearml/wexpect-venv
synced 2025-02-07 13:30:56 +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.
|
# Create source distribution.
|
||||||
- python -m setup sdist
|
- python -m setup sdist
|
||||||
|
|
||||||
# Upload to test pypi
|
# Upload to pypi.
|
||||||
- twine upload -r testpypi dist\\wexpect*.tar.gz
|
# More precisely. Upload pypi the master builds, and to test-pypi any other builds.
|
||||||
|
- git branch | find "* master" > NUL & IF ERRORLEVEL 1 ( \
|
||||||
# Upload to offitial pypi
|
twine upload -r testpypi dist\\wexpect*.tar.gz \
|
||||||
- twine upload -r pypi dist\\wexpect*.tar.gz
|
) ELSE ( \
|
||||||
|
twine upload -r pypi dist\\wexpect*.tar.gz )
|
||||||
|
|
@ -2064,6 +2064,15 @@ class Wtty:
|
|||||||
win32console.AttachConsole(self.conpid)
|
win32console.AttachConsole(self.conpid)
|
||||||
self.__consin = win32console.GetStdHandle(win32console.STD_INPUT_HANDLE)
|
self.__consin = win32console.GetStdHandle(win32console.STD_INPUT_HANDLE)
|
||||||
self.__consout = self.getConsoleOut()
|
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:
|
except:
|
||||||
# In case of any error: We "switch back" (attach) our original console, then raise the
|
# In case of any error: We "switch back" (attach) our original console, then raise the
|
||||||
# error.
|
# error.
|
||||||
|
Loading…
Reference in New Issue
Block a user