mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
installer: Clean up unattended preinstall drivers
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
b6e4e4538d
commit
355d7fed80
@ -234,8 +234,8 @@ class Installer(object):
|
|||||||
guest.os.arch)
|
guest.os.arch)
|
||||||
drivers = unattended.download_drivers(drivers_location,
|
drivers = unattended.download_drivers(drivers_location,
|
||||||
InstallerTreeMedia.make_scratchdir(guest), meter)
|
InstallerTreeMedia.make_scratchdir(guest), meter)
|
||||||
if drivers:
|
injections.extend(drivers)
|
||||||
injections.extend(drivers)
|
self._tmpfiles.extend([driverpair[0] for driverpair in drivers])
|
||||||
|
|
||||||
iso = perform_cdrom_injections(injections,
|
iso = perform_cdrom_injections(injections,
|
||||||
InstallerTreeMedia.make_scratchdir(guest))
|
InstallerTreeMedia.make_scratchdir(guest))
|
||||||
|
@ -376,9 +376,14 @@ def download_drivers(locations, scratchdir, meter):
|
|||||||
|
|
||||||
drivers = []
|
drivers = []
|
||||||
|
|
||||||
for location in locations:
|
try:
|
||||||
filename = location.rsplit('/', 1)[1]
|
for location in locations:
|
||||||
driver = fetcher.acquireFile(location)
|
filename = location.rsplit('/', 1)[1]
|
||||||
drivers.append((driver, filename))
|
driver = fetcher.acquireFile(location)
|
||||||
|
drivers.append((driver, filename))
|
||||||
|
except Exception: # pragma: no cover
|
||||||
|
for driverpair in drivers:
|
||||||
|
os.unlink(driverpair[0])
|
||||||
|
raise
|
||||||
|
|
||||||
return drivers
|
return drivers
|
||||||
|
Loading…
Reference in New Issue
Block a user