timezone - resolving path using SCOPE_SKIN
authorims <ims21@users.sourceforge.net>
Fri, 10 Apr 2015 20:24:52 +0000 (22:24 +0200)
committerErik Slagter <erik@openpli.org>
Sat, 11 Apr 2015 07:23:03 +0000 (09:23 +0200)
Signed-off-by: Erik Slagter <erik@openpli.org>

lib/python/Components/Timezones.py

index 890eb6c..9be68ac 100644 (file)
@@ -2,6 +2,7 @@ import xml.etree.cElementTree
 
 from os import environ, unlink, symlink
 import time
+from Tools.Directories import SCOPE_SKIN, resolveFilename
 
 class Timezones:
        def __init__(self):
@@ -10,7 +11,7 @@ class Timezones:
 
        def readTimezonesFromFile(self):
                try:
-                       root = xml.etree.cElementTree.parse('/usr/share/enigma2/timezone.xml').getroot()
+                       root = xml.etree.cElementTree.parse(resolveFilename(SCOPE_SKIN, 'timezone.xml')).getroot()
                        for zone in root.findall("zone"):
                                self.timezones.append((zone.get('name',""), zone.get('zone',"")))
                except: