[FIX] switchTo and add swithcBack

This commit is contained in:
Benedek Racz 2019-10-08 11:40:47 +02:00
parent 0b1dec9535
commit 0f2467f30c
2 changed files with 3 additions and 2 deletions

View File

@ -41,6 +41,7 @@ after_test:
# Upload to pypi.
# More precisely. Upload pypi the master builds, and to test-pypi any other builds.
# See more at https://stackoverflow.com/a/33662275/2506522
- git branch | find "* master" > NUL & IF ERRORLEVEL 1 ( \
twine upload -r testpypi dist\\wexpect*.tar.gz \
) ELSE ( \

View File

@ -2071,12 +2071,12 @@ class Wtty:
logging.info(e)
# In case of any error: We "switch back" (attach) our original console, then raise the
# error.
win32console.AttachConsole(self.__parentPid)
self.switchBack()
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.
win32console.AttachConsole(self.__parentPid)
self.switchBack()
raise