diff options
| author | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-08-29 22:08:33 +0000 |
|---|---|---|
| committer | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-08-29 22:08:33 +0000 |
| commit | bc5fff23f0b5e52e67fa6df82506320523b6771a (patch) | |
| tree | cb389447d9593f4754874743f385cf5541b50f88 /lib/python/Components | |
| parent | b29f0af566c8c1fd25de259ba35f5130a7efe8ca (diff) | |
| download | enigma2-bc5fff23f0b5e52e67fa6df82506320523b6771a.tar.gz enigma2-bc5fff23f0b5e52e67fa6df82506320523b6771a.zip | |
make capacity fault-proof
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/Harddisk.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index a09073ba..c5ba1344 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -22,10 +22,12 @@ class Harddisk: line = procfile.readline() procfile.close() - if line == "": + try: + cap = int(line) + except: return -1 - - return int(line) + + return cap def model(self): procfile = tryOpen(self.prochdx + "model") |
