diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2009-11-19 11:13:17 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2009-11-19 11:16:34 +0100 |
| commit | eaa3a6e58b892b73dad128a0fa80da459cbc6b03 (patch) | |
| tree | b7186827cba1b5c5eac30f2ad98627bbd7f432bc /lib | |
| parent | 8ec4fcb1ebd931a169cf9666271b5a4bb6a9467b (diff) | |
| download | enigma2-eaa3a6e58b892b73dad128a0fa80da459cbc6b03.tar.gz enigma2-eaa3a6e58b892b73dad128a0fa80da459cbc6b03.zip | |
Components/About.py: fix /etc/image-version parser..now we also show image type (release/experimental) and major minor revision
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/python/Components/About.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/python/Components/About.py b/lib/python/Components/About.py index bb2d7568..58d67dc9 100644 --- a/lib/python/Components/About.py +++ b/lib/python/Components/About.py @@ -19,11 +19,20 @@ class About: #0120 2005 11 29 01 16 #0123 4567 89 01 23 45 version = splitted[1] + image_type = version[0] # 0 = release, 1 = experimental + major = version[1] + minor = version[2] + revision = version[3] year = version[4:8] month = version[8:10] day = version[10:12] - - return '-'.join(("dev", year, month, day)) + if image_type == '0': + image_type = "Release" + else: + image_type = "Experimental" + date = '-'.join((year, month, day)) + version = '.'.join((major, minor, revision)) + return ' '.join((image_type, version, date)) file.close() except IOError: pass |
