dont show display contrast setting in display setup when a oled is detected
[enigma2.git] / lib / python / Components / About.py
1 from Tools.Directories import resolveFilename, SCOPE_SYSETC
2 from enigma import getEnigmaVersionString
3
4 class About:
5         def __init__(self):
6                 pass
7
8         def getVersionString(self):
9                 return self.getImageVersionString()
10
11         def getImageVersionString(self):
12                 try:
13                         file = open(resolveFilename(SCOPE_SYSETC, 'image-version'), 'r')
14                         lines = file.readlines()
15                         for x in lines:
16                                 splitted = x.split('=')
17                                 if splitted[0] == "version":
18                                         #     YYYY MM DD hh mm
19                                         #0120 2005 11 29 01 16
20                                         #0123 4567 89 01 23 45
21                                         version = splitted[1]
22                                         year = version[4:8]
23                                         month = version[8:10]
24                                         day = version[10:12]
25
26                                         return '-'.join(["dev", year, month, day])
27                         file.close()
28                 except IOError:
29                         pass
30
31                 return "unavailable"
32
33         def getEnigmaVersionString(self):
34                 return getEnigmaVersionString()
35
36 about = About()