The biggest problem during usage and testing of a remote build feature is the
fact osc asks user several times for the input. In this case, remote process
simply hangs and waits for the response, which is not even displayed, because
of stdout buffering. The samy apply for non-interactive usage - if osc is
called from a script, then it hangs waiting on something on stdin, which will
Therefor I've added a simple check os.isatty(sys.stdin.fileno()) to the
osc.core.raw_input() - in case it's not terminal, the new RawInputError is
raised. It will show-up the question on stderr and program will be terminated.
I'd say there is some non-interactive osc feature requested by L3 team, which
can be partially solved by this patch
@milan, can you follow up?
BTW: I've added the osc.core.raw_input to oscssl.py and build.py as well, to
enforce the new behavior. The cmdln.py remains untouched, because I was not
sure if this code is even used by osc.
Michal Vyskocil (1):
raw_input checks if stdin is tty
osc/build.py | 1 +
osc/core.py | 2 ++
osc/oscerr.py | 8 ++++++++
osc/oscssl.py | 2 ++
4 files changed, 13 insertions(+)