blob: 6317af7cb23efa2d0198dc9aec6fad150f174f97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
from Tools.Directories import *
class About:
def __init__(self):
pass
def getVersionString(self):
try:
file = open(resolveFilename(SCOPE_SYSETC, 'image-version'), 'r')
lines = file.readlines()
for x in lines:
splitted = x.split('=')
if splitted[0] == "version":
# YYYY MM DD hh mm
#0120 2005 11 29 01 16
#0123 4567 89 01 23 45
version = splitted[1]
year = version[4:8]
month = version[8:10]
day = version[10:12]
return '-'.join(["2.0", year, month, day])
file.close()
except IOError:
pass
return "unavailable"
about = About()
|