From: Stefan Pluecken Date: Tue, 30 Aug 2005 22:48:32 +0000 (+0000) Subject: first tyry to load skin from data/skin.xml and if this file is not found, use /usr... X-Git-Tag: 2.6.0~5691 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/51370b06a53f4c14e890ea5b570d871067b5ef91 first tyry to load skin from data/skin.xml and if this file is not found, use /usr/share/enigma2/skin.xml --- 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(',')