git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
make capacity fault-proof
[enigma2.git]
/
lib
/
python
/
Components
/
Harddisk.py
diff --git
a/lib/python/Components/Harddisk.py
b/lib/python/Components/Harddisk.py
index a09073baa355b107f6d9191cc27dc7ab2547f9ad..c5ba1344bb3859904de46fb3b2757c506ee667f9 100644
(file)
--- 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")