Hi Michal, On 2012-10-31 11:21:41 +0100, Michal Vyskocil wrote:
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.
In this case ssh should be invoked with the "-t" parameter.
The samy apply for non-interactive usage - if osc is called from a script, then it hangs waiting on something on stdin, which will never come.
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.
We could add something like a "--script-mode" (config) option. If "osc --script-mode <cmd>" is invoked and <cmd> requires a user input an exception is raised. What do you think?
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.
The codepath in cmdln.py which uses the "raw_input" call isn't executed by osc. Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org