From d89be097be4a9ac52166c5f47cc189c5522d3441 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Fri, 1 Feb 2008 23:15:24 +0000 Subject: add possibilty to hide menu entries when needed hardware is not available --- lib/python/Components/Harddisk.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/python/Components/Harddisk.py') diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index 16736b20..82535447 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -3,6 +3,8 @@ from os import system, listdir, statvfs, popen, makedirs from Tools.Directories import SCOPE_HDD, resolveFilename from Tools.CList import CList +from SystemInfo import SystemInfo + def tryOpen(filename): try: procFile = open(filename) @@ -215,6 +217,8 @@ class HarddiskManager: hdd = Harddisk(hddNum) self.hdd.append(hdd) + SystemInfo["Harddisc"] = len(self.hdd) > 0 + # currently, this is just an enumeration of what's possible, # this probably has to be changed to support automount stuff. # still, if stuff is mounted into the correct mountpoints by -- cgit v1.2.3