From: Stefan Pluecken Date: Thu, 3 Jul 2008 13:02:41 +0000 (+0000) Subject: the class HardwareInfo is used to determine the dreambox model (taken X-Git-Tag: 2.6.0~1082 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/89cd5ceb75dd5b59ff58a549402541a983d42ccd the class HardwareInfo is used to determine the dreambox model (taken from /proc/stb/info/model) (needs new driver info.ko) --- 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