From: Felix Domke Date: Mon, 23 Mar 2009 21:52:15 +0000 (+0100) Subject: fix broken code when a hotplug partition was removed X-Git-Url: http://code.vuplus.com/gitweb/?a=commitdiff_plain;h=4634815c0fd9219332472707f6fcbdfd5d5b7821;p=vuplus_dvbapp fix broken code when a hotplug partition was removed --- diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index 37905b7..ad6c1a3 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