From 51370b06a53f4c14e890ea5b570d871067b5ef91 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Tue, 30 Aug 2005 22:48:32 +0000 Subject: [PATCH] first tyry to load skin from data/skin.xml and if this file is not found, use /usr/share/enigma2/skin.xml --- skin.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/skin.py b/skin.py index bf8de72a..9d4b7571 100644 --- a/skin.py +++ b/skin.py @@ -16,11 +16,14 @@ def dump(x, i=0): # 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: - 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(',') -- 2.30.2