[prev in list] [next in list] [prev in thread] [next in thread]
List: opensuse-buildservice
Subject: Re: [opensuse-buildservice] calling osc from Python scripts
From: Marcus =?iso-8859-1?Q?H=FCwe?= <suse-tux () gmx ! de>
Date: 2013-07-31 12:24:43
Message-ID: 20130731122443.GA2528 () linux ! uni-paderborn ! de
[Download RAW message or body]
On 2013-07-31 13:22:42 +0200, Karsten Keil wrote:
<SNIP>
> I looked at the osc-wrapper.py 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 = babysitter.run(osccli)
>
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.
Marcus
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic