Support incomplete .treeinfo files
In case there was '.treeinfo' file available, virt-install was forcibly getting image information out of the file. For some distributions (especially older releases, e.g. RHEL 4), there might be '.treeinfo' file available, but with incomplete information. Allow fallback to default values even when '.treeinfo' file is found. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=954262
This commit is contained in:
parent
a58442ec3e
commit
70fa76a780
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Represents OS distribution specific install data
|
||||
#
|
||||
# Copyright 2006-2007 Red Hat, Inc.
|
||||
# Copyright 2006-2007, 2013 Red Hat, Inc.
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -268,9 +268,13 @@ class Distro:
|
|||
kernelpath = None
|
||||
initrdpath = None
|
||||
if self._hasTreeinfo(fetcher, progresscb):
|
||||
kernelpath = self._getTreeinfoMedia("kernel")
|
||||
initrdpath = self._getTreeinfoMedia("initrd")
|
||||
else:
|
||||
try:
|
||||
kernelpath = self._getTreeinfoMedia("kernel")
|
||||
initrdpath = self._getTreeinfoMedia("initrd")
|
||||
except ConfigParser.NoSectionError:
|
||||
pass
|
||||
|
||||
if not kernelpath or not initrdpath:
|
||||
# fall back to old code
|
||||
if self.type is None or self.type == "hvm":
|
||||
paths = self._hvm_kernel_paths
|
||||
|
|
Loading…
Reference in New Issue