X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/eaa3a6e58b892b73dad128a0fa80da459cbc6b03..d0cddddad18d416957a0cd37d343312f72818acc:/lib/python/Components/About.py diff --git a/lib/python/Components/About.py b/lib/python/Components/About.py old mode 100644 new mode 100755 index 58d67dc9..6b322c9d --- a/lib/python/Components/About.py +++ b/lib/python/Components/About.py @@ -1,5 +1,6 @@ from Tools.Directories import resolveFilename, SCOPE_SYSETC from enigma import getEnigmaVersionString +from os import popen class About: def __init__(self): @@ -26,13 +27,14 @@ class About: year = version[4:8] month = version[8:10] day = version[10:12] + date = '-'.join((year, month, day)) if image_type == '0': image_type = "Release" + version = '.'.join((major, minor, revision)) + return ' '.join((image_type, version, date)) else: image_type = "Experimental" - date = '-'.join((year, month, day)) - version = '.'.join((major, minor, revision)) - return ' '.join((image_type, version, date)) + return ' '.join((image_type, date)) file.close() except IOError: pass @@ -42,4 +44,14 @@ class About: def getEnigmaVersionString(self): return getEnigmaVersionString() + def getKernelVersionString(self): + try: + result = popen("uname -r","r").read().strip("\n").split('-') + kernel_version = result[0] + return kernel_version + except: + pass + + return "unknown" + about = About()