python-blivet/0003-Fix-UnboundLocalError-in-MD-populator.patch
2024-02-12 18:35:27 +01:00

27 lines
919 B
Diff

From c141179b18984c5a96cd605c29df9716c714afe8 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Mon, 12 Feb 2024 14:49:23 +0100
Subject: [PATCH] Fix UnboundLocalError in MD populator
Follow-up for a73bb08255a97cf4f16c764ef09341a2421318d6
---
blivet/populator/helpers/mdraid.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/blivet/populator/helpers/mdraid.py b/blivet/populator/helpers/mdraid.py
index 22ca5195..c552aace 100644
--- a/blivet/populator/helpers/mdraid.py
+++ b/blivet/populator/helpers/mdraid.py
@@ -60,6 +60,8 @@ class MDDevicePopulator(DevicePopulator):
# try to get the device again now that we've got all the parents
if name:
device = self._devicetree.get_device_by_device_id("MDRAID-" + name, incomplete=flags.allow_imperfect_devices)
+ else:
+ device = None
if device is None:
try:
--
2.43.0