From 3d4b408c93e995f6f0266015f2173174454c629f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 20 Jun 2024 19:38:48 +0200 Subject: [PATCH] [rawfs] Read blkid stdout only once, be more clear when there isn't a uuid --- src/modules/rawfs/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/rawfs/main.py b/src/modules/rawfs/main.py index 736fc39cb..760498212 100644 --- a/src/modules/rawfs/main.py +++ b/src/modules/rawfs/main.py @@ -146,9 +146,10 @@ def update_global_storage(item, gs): ret = subprocess.run(["blkid", "-s", "UUID", "-o", "value", item.destination], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) if ret.returncode == 0: + uuid = ret.stdout.rstrip() libcalamares.utils.debug("Setting {} UUID to {}".format(item.destination, - ret.stdout.rstrip())) - gs[gs.index(partition)]["uuid"] = ret.stdout.rstrip() + uuid or "")) + gs[gs.index(partition)]["uuid"] = uuid gs[gs.index(partition)]["source"] = item.source libcalamares.globalstorage.remove("partitions")