[opensuse-buildservice] osc.core.get_user_projpkgs() function returns strange data
Hello, I am playing with osc and tried to get list of involved projects and packages. I used osc.core.get_user_projpkgs(apiurl, user) but it is still returning me: {'package_id': <Element 'collection' at 0xbe1c00>, 'project_id': <Element 'collection' at 0xc2a750>} and i'am not sure, what to do with it. Thank you Michal Smrž -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi, On 2010-09-29 19:15:58 +0200, Michal Smrž wrote:
I am playing with osc and tried to get list of involved projects and packages.
I used osc.core.get_user_projpkgs(apiurl, user)
but it is still returning me:
{'package_id': <Element 'collection' at 0xbe1c00>, 'project_id': <Element 'collection' at 0xc2a750>}
and i'am not sure, what to do with it.
It returns all the project/packages where "user" is involved in. To access for instance all packages you can do the following: for i in res['package_id']: print 'I\'m involved in pkg %s (project: %s)' % (i.get('name'), i.get('project')) You can also dump the complete xml with "ET.dump(res['project_id'])". Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Marcus Hüwe
-
Michal Smrž