PR#1691: human-readable timestamp in koji-gc log
Merges #1691 https://pagure.io/koji/pull-request/1691 Fixes: #1690 https://pagure.io/koji/issue/1690 koji-gc message about "last used" is just timestamp
This commit is contained in:
commit
a84a338d73
1 changed files with 2 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ except ImportError: # pragma: no cover
|
|||
import koji
|
||||
from koji.util import LazyDict, LazyValue, to_list
|
||||
import koji.policy
|
||||
import datetime
|
||||
import fnmatch
|
||||
import optparse
|
||||
import os
|
||||
|
|
@ -473,7 +474,7 @@ def handle_trash():
|
|||
#XXX - should really check time server side
|
||||
if options.debug:
|
||||
print("[%i/%i] Build has been used in a buildroot: %s" % (i, N, nvr))
|
||||
print("Last_used: %r" % ts)
|
||||
print("Last_used: %s" % datetime.datetime.fromtimestamp(ts).isoformat())
|
||||
age = time.time() - ts
|
||||
if age < min_age:
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue