qvm-template: Replace "template-install-time" with "template-installtime" for consistency

This commit is contained in:
WillyPillow 2020-08-30 02:01:19 +08:00
parent 32a38c7183
commit d65d3c741a
No known key found for this signature in database
GPG Key ID: 3839E194B1415A9C

View File

@ -919,7 +919,7 @@ def install(
tpl.features['template-buildtime'] = \ tpl.features['template-buildtime'] = \
str(datetime.datetime.fromtimestamp( str(datetime.datetime.fromtimestamp(
int(package_hdr[rpm.RPMTAG_BUILDTIME]))) int(package_hdr[rpm.RPMTAG_BUILDTIME])))
tpl.features['template-install-time'] = \ tpl.features['template-installtime'] = \
str(datetime.datetime.today()) str(datetime.datetime.today())
tpl.features['template-license'] = \ tpl.features['template-license'] = \
package_hdr[rpm.RPMTAG_LICENSE] package_hdr[rpm.RPMTAG_LICENSE]
@ -1033,7 +1033,7 @@ def list_templates(args: argparse.Namespace,
assert False and 'Unknown operation' assert False and 'Unknown operation'
def append_vm(vm, status): def append_vm(vm, status):
append(query_local(vm), status, vm.features['template-install-time']) append(query_local(vm), status, vm.features['template-installtime'])
if not (args.installed or args.available or args.extras or args.upgrades): if not (args.installed or args.available or args.extras or args.upgrades):
args.all = True args.all = True