From 4634815c0fd9219332472707f6fcbdfd5d5b7821 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Mon, 23 Mar 2009 22:52:15 +0100 Subject: [PATCH] fix broken code when a hotplug partition was removed --- lib/python/Components/Harddisk.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index 37905b7d..ad6c1a3b 100755 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -455,11 +455,10 @@ class HarddiskManager: self.on_partition_list_change("remove", x) l = len(device) if l and not device[l-1].isdigit(): - idx = 0 for hdd in self.hdd: if hdd.device == device: - self.hdd[x].stop() - del self.hdd[idx] + hdd.stop() + self.hdd.remove(hdd) break SystemInfo["Harddisk"] = len(self.hdd) > 0 -- 2.30.2