aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Tools/HardwareInfo.py
blob: f426d180aef4a7495474e1aa53abc7d55181585a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class HardwareInfo:
	def __init__(self):
		self.device = "unknown"
		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)