Mailinglist Archive: opensuse-buildservice (170 mails)

< Previous Next >
Re: [opensuse-buildservice] calling osc from Python scripts
On 2013-07-31 13:22:42 +0200, Karsten Keil wrote:


I looked at the and was thinking that it should be easy
to do. Simple give the commandline.Osc() call the arguments for the osc
command like

osccli = commandline.Osc("copypac","-e", org, pkg, new)
r =

The constructor parameters are not interpreted as a "command".

But this does not work, it seems the arguments are ignored, I get always
the osc help page (same as running osc with no arguments).

Something like this should work:

from osc import commandline
cli = commandline.Osc()
cli.main(['osc', 'ls', 'home:Marcus_H'])

If needed I can also adjust the babysitter so that you can pass a
"command" to its "run" method.

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation