Skip to content

Commit 54b3dc7

Browse files
committed
stub.py: Clean up fud_firmware from a prior run if it exists
Signed-off-by: Hector Martin <[email protected]>
1 parent 301e5c7 commit 54b3dc7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/stub.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ def collect_firmware(self, pkg):
295295
logging.info("StubInstaller.collect_firmware()")
296296

297297
logging.info("Collecting FUD firmware")
298+
if os.path.exists("fud_firmware"):
299+
shutil.rmtree("fud_firmware")
300+
298301
os.makedirs("fud_firmware", exist_ok=True)
299302
copied = set()
300303
for identity in self.all_identities:
@@ -304,6 +307,7 @@ def collect_firmware(self, pkg):
304307
device = identity["Info"]["DeviceClass"]
305308
if not device.endswith("ap"):
306309
continue
310+
logging.info(f"Collecting FUD firmware for device {device}")
307311
device = device[:-2]
308312
for key, val in identity["Manifest"].items():
309313
if key in ("BaseSystem", "OS", "Ap,SystemVolumeCanonicalMetadata",

0 commit comments

Comments
 (0)