aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2009-03-23 22:52:15 +0100
committerFelix Domke <tmbinc@elitedvb.net>2009-03-23 22:52:15 +0100
commit4634815c0fd9219332472707f6fcbdfd5d5b7821 (patch)
treeff938fa649c42982c287d4979b19e4b3778507a8 /lib/python
parentf9259c898537d2c5f5722b9c6d8a9217ee5799ae (diff)
downloadenigma2-4634815c0fd9219332472707f6fcbdfd5d5b7821.tar.gz
enigma2-4634815c0fd9219332472707f6fcbdfd5d5b7821.zip
fix broken code when a hotplug partition was removed
Diffstat (limited to 'lib/python')
-rwxr-xr-xlib/python/Components/Harddisk.py5
1 files 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