1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

adrian told me about the package parameter :)

This commit is contained in:
Dirk Mueller 2009-02-20 11:56:13 +00:00
parent c526f4ee9a
commit be0add2e63

View File

@ -2822,15 +2822,16 @@ def get_buildhistory(apiurl, prj, package, platform, arch):
def print_jobhistory(apiurl, prj, current_package, platform, arch):
import time
u = makeurl(apiurl, ['build', prj, platform, arch, '_jobhistory'])
if current_package:
u = makeurl(apiurl, ['build', prj, platform, arch, '_jobhistory'], "package=%s" % (current_package))
else:
u = makeurl(apiurl, ['build', prj, platform, arch, '_jobhistory'])
f = http_GET(u)
root = ET.parse(f).getroot()
print "time package reason code build time"
for node in root.findall('jobhist'):
package = node.get('package')
if current_package and package != current_package:
continue
reason = node.get('reason')
if not reason:
reason = "unknown"