aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-07-07 10:37:26 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-07-07 10:37:26 +0000
commitfefaf0d0f2b71ee47ffe0c227e1778f7d99e9430 (patch)
tree34210749555a3d4dcaf03733c2ad01910677f905
parente1685e42414d9d21f240f2655ce30b802c952753 (diff)
downloadenigma2-fefaf0d0f2b71ee47ffe0c227e1778f7d99e9430.tar.gz
enigma2-fefaf0d0f2b71ee47ffe0c227e1778f7d99e9430.zip
make model detection optional
-rw-r--r--lib/python/Tools/HardwareInfo.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/python/Tools/HardwareInfo.py b/lib/python/Tools/HardwareInfo.py
index 38cccb57..f426d180 100644
--- a/lib/python/Tools/HardwareInfo.py
+++ b/lib/python/Tools/HardwareInfo.py
@@ -1,10 +1,17 @@
class HardwareInfo:
def __init__(self):
self.device = "unknown"
- file = open("/proc/stb/info/model", "r")
- self.device = file.readline().strip()
+ try:
+ file = open("/proc/stb/info/model", "r")
+ self.device = file.readline().strip()
+ file.close()
+ except:
+ print "----------------"
+ print "you should upgrade to new drivers for the hardware detection to work properly"
+ print "----------------"
def get_device_name(self):
return self.device
- device_name = property(get_device_name) \ No newline at end of file
+ device_name = property(get_device_name)
+