1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-05 07:03:38 +02:00

osc tr: show the time when the event happened

This commit is contained in:
2017-08-31 13:57:21 +02:00
parent e0bce5652a
commit 3a41ae64f0

View File

@@ -5504,7 +5504,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
xml = show_package_trigger_reason(apiurl, project, package, repository, arch)
root = ET.fromstring(xml)
reason = root.find('explain').text
print(reason)
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'):