1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-27 20:52:14 +01:00

osc tr: show the time when the event happened

This commit is contained in:
Dominique Leuenberger 2017-08-31 13:57:21 +02:00
parent e0bce5652a
commit 3a41ae64f0
Signed by untrusted user: dimstar
GPG Key ID: E69F22089B497C99

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) xml = show_package_trigger_reason(apiurl, project, package, repository, arch)
root = ET.fromstring(xml) root = ET.fromstring(xml)
reason = root.find('explain').text 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": if reason == "meta change":
print("changed keys:") print("changed keys:")
for package in root.findall('packagechange'): for package in root.findall('packagechange'):