Comments (3)
Googled a bit more to check the above link's assertion that one needs to explicitly tell pexpect to expect an EOF, and as it turns out one of the official pexpect homepages mentions this! Go here: http://www.noah.org/python/pexpect/ and search for 'exception'.
Will poke at this side of things and hope it meshes with how I am using the lib...
from invoke.
Bugger, with p.expect(pexpect.EOF)
in place, the error does not fire, but it seems to be skipping the out_filter
attached to interact()
. I think this is because expect
means to wait until its arg shows up [duh] and thus by the time we arrive at our interact
call things are already done.
The docs mention how when you expect-til-EOF, the output is available in p.before
, and that bears up -- when expecting, it contains the stdout/err mix, when not expecting, it's None. However this doesn't help me because I need realtime.
Need to figure out if there's another way or if I should just suck it up and try catching this specific OSError and move on.
from invoke.
Nope, no real way around this. Sucking up & catching/ignoring this specific OSError, and also attaching to result object for sanity's sake. Seriously doubt anybody will need it, but now my conscience is clean.
from invoke.
Related Issues (20)
- Add support for argument choices, like argparse
- AmbiguousEnvVar when setting default runner.env with both lower and uppercase HOT 1
- 2.0.0: pytest is failing in tests/runners.py units HOT 8
- 2.1.0 finds it suddenly unable to find the tasks directory HOT 9
- 2.1 has no decorator HOT 3
- Import is resolving the wrong module HOT 2
- after an upgrade to ubuntu 23.04 (python 3.11), invoke can no longer import external modules HOT 2
- MockContext does not support asynchronous HOT 2
- Invoke 2.1.0 / 2.1.1 is not able to read invoke.yaml configuration file HOT 10
- Add __all__ to __init__.py
- task decorator is wrongly typed HOT 3
- Improve types of context.run HOT 2
- types of context.config is not correct HOT 3
- `add_collection()` is missing the `ModuleType` in the type-hints HOT 1
- How do I read the current output with asynchronous without waiting for the process to finish? HOT 1
- Regex support for MockContext is broken?
- `paramiko.ssh_exception.SSHException: Channel is not open` when chaining invoke tasks
- invoke 2.1.3 does not work when run inside bash
- 2.2.0: sphinx warnings `reference target not found`
- Document adding print-completion-script to venv
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from invoke.