diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-02-10 15:02:13 +0100 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-02-10 15:02:13 +0100 |
| commit | b7f0a4fed2bf0249c9bffc3cc185688748ab3058 (patch) | |
| tree | c0bb86f4d4cd28f7e98009ea523f8c82b0c4125e /lib/python/Components | |
| parent | 9bae31947bc0a7475f8ad2af792c9d0bcbff46d0 (diff) | |
| download | enigma2-b7f0a4fed2bf0249c9bffc3cc185688748ab3058.tar.gz enigma2-b7f0a4fed2bf0249c9bffc3cc185688748ab3058.zip | |
stop idle timer when removing a harddisk
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/Harddisk.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index 44245ebb..470055e4 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -21,6 +21,7 @@ class Harddisk: s_minor = int(tmp[1]) self.max_idle_time = 0 self.idle_running = False + self.timer = None for disc in listdir("/dev/discs"): path = readlink('/dev/discs/'+disc) devidex = '/dev/discs/'+disc+'/' @@ -37,6 +38,11 @@ class Harddisk: def __lt__(self, ob): return self.device < ob.device + def stop(self): + if self.timer: + self.timer.stop() + self.timer.callback.remove(self.runIdle) + def bus(self): ide_cf = self.device.find("hd") == 0 and self.devidex2.find("host0") == -1 # 7025 specific internal = self.device.find("hd") == 0 @@ -454,6 +460,7 @@ class HarddiskManager: idx = 0 for hdd in self.hdd: if hdd.device == device: + self.hdd[x].stop() del self.hdd[idx] break SystemInfo["Harddisk"] = len(self.hdd) > 0 |
