mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 14:56:14 +01:00
Merge pull request #552 from lethliel/fix_unhandled_exception_on_empty_package
fix triggerreason on empty packages.
This commit is contained in:
commit
7df178b50b
@ -5654,9 +5654,13 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
print(apiurl, project, package, repository, arch)
|
||||
xml = show_package_trigger_reason(apiurl, project, package, repository, arch)
|
||||
root = ET.fromstring(xml)
|
||||
reason = root.find('explain').text
|
||||
triggertime = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(int(root.find('time').text)))
|
||||
print("%s (at %s)" % (reason, triggertime))
|
||||
if root.find('explain') is None:
|
||||
reason = "No triggerreason found"
|
||||
print(reason)
|
||||
else:
|
||||
reason = root.find('explain').text
|
||||
triggertime = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(int(root.find('time').text)))
|
||||
print("%s (at %s)" % (reason, triggertime))
|
||||
if reason == "meta change":
|
||||
print("changed keys:")
|
||||
for package in root.findall('packagechange'):
|
||||
|
Loading…
Reference in New Issue
Block a user