first tyry to load skin from data/skin.xml and if this file is not found, use /usr...
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 30 Aug 2005 22:48:32 +0000 (22:48 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 30 Aug 2005 22:48:32 +0000 (22:48 +0000)
skin.py

diff --git a/skin.py b/skin.py
index bf8de72..9d4b757 100644 (file)
--- a/skin.py
+++ b/skin.py
@@ -16,11 +16,14 @@ def dump(x, i=0):
 
 # read the skin
 try:
 
 # read the skin
 try:
-       skinfile = file('/usr/share/enigma2/skin.xml', 'r')
-       dom = xml.dom.minidom.parseString(skinfile.read())
-       skinfile.close()
+       # first we search in the current path
+       skinfile = file('data/skin.xml', 'r')
 except:
 except:
-       print "Error opening skin.xml"
+       # if not found in the current path, we use the global datadir-path
+       skinfile = file('/usr/share/enigma2/skin.xml', 'r')
+dom = xml.dom.minidom.parseString(skinfile.read())
+skinfile.close()
+
 
 def parsePosition(str):
        x, y = str.split(',')
 
 def parsePosition(str):
        x, y = str.split(',')