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)
|
||||
drivers = unattended.download_drivers(drivers_location,
|
||||
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,
|
||||
InstallerTreeMedia.make_scratchdir(guest))
|
||||
|
|
|
@ -376,9 +376,14 @@ def download_drivers(locations, scratchdir, meter):
|
|||
|
||||
drivers = []
|
||||
|
||||
for location in locations:
|
||||
filename = location.rsplit('/', 1)[1]
|
||||
driver = fetcher.acquireFile(location)
|
||||
drivers.append((driver, filename))
|
||||
try:
|
||||
for location in locations:
|
||||
filename = location.rsplit('/', 1)[1]
|
||||
driver = fetcher.acquireFile(location)
|
||||
drivers.append((driver, filename))
|
||||
except Exception: # pragma: no cover
|
||||
for driverpair in drivers:
|
||||
os.unlink(driverpair[0])
|
||||
raise
|
||||
|
||||
return drivers
|
||||
|
|
Loading…
Reference in New Issue