aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-07-03 13:02:41 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-07-03 13:02:41 +0000
commit89cd5ceb75dd5b59ff58a549402541a983d42ccd (patch)
tree7d2fa0d7df9f85610921af045ae472b75f3553b7 /lib/python
parent6e68543591be09859bbaa4c19e0065e65d8acfe3 (diff)
downloadenigma2-89cd5ceb75dd5b59ff58a549402541a983d42ccd.tar.gz
enigma2-89cd5ceb75dd5b59ff58a549402541a983d42ccd.zip
the class HardwareInfo is used to determine the dreambox model (taken
from /proc/stb/info/model) (needs new driver info.ko)
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Tools/HardwareInfo.py10
-rw-r--r--lib/python/Tools/Makefile.am2
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/python/Tools/HardwareInfo.py b/lib/python/Tools/HardwareInfo.py
new file mode 100644
index 00000000..38cccb57
--- /dev/null
+++ b/lib/python/Tools/HardwareInfo.py
@@ -0,0 +1,10 @@
+class HardwareInfo:
+ def __init__(self):
+ self.device = "unknown"
+ file = open("/proc/stb/info/model", "r")
+ self.device = file.readline().strip()
+
+ def get_device_name(self):
+ return self.device
+
+ device_name = property(get_device_name) \ No newline at end of file
diff --git a/lib/python/Tools/Makefile.am b/lib/python/Tools/Makefile.am
index 9d6ee5d7..609f3bab 100644
--- a/lib/python/Tools/Makefile.am
+++ b/lib/python/Tools/Makefile.am
@@ -4,4 +4,4 @@ install_PYTHON = \
FuzzyDate.py XMLTools.py Directories.py NumericalTextInput.py \
KeyBindings.py BoundFunction.py ISO639.py Notifications.py __init__.py \
RedirectOutput.py DreamboxHardware.py Import.py Event.py CList.py \
- LoadPixmap.py Profile.py
+ LoadPixmap.py Profile.py HardwareInfo.py