fix enigma crash when skin parsing failed and display error message in debug
authorims <ims21@users.sourceforge.net>
Fri, 27 Feb 2015 11:35:35 +0000 (12:35 +0100)
committerlittlesat <littlesat99@yahoo.com>
Fri, 27 Feb 2015 14:24:43 +0000 (15:24 +0100)
Signed-off-by: littlesat <littlesat99@yahoo.com>

skin.py

diff --git a/skin.py b/skin.py
index 920aec3..b69c69a 100644 (file)
--- a/skin.py
+++ b/skin.py
@@ -46,8 +46,13 @@ def addSkin(name, scope = SCOPE_SKIN):
        filename = resolveFilename(scope, name)
        if fileExists(filename):
                mpath = os.path.dirname(filename) + "/"
-               dom_skins.append((mpath, xml.etree.cElementTree.parse(filename).getroot()))
-               return True
+               try:
+                       dom_skins.append((mpath, xml.etree.cElementTree.parse(filename).getroot()))
+               except:
+                       print "[SKIN ERROR] error in %s" % filename
+                       return False
+               else:
+                       return True
        return False
 
 # get own skin_user_skinname.xml file, if exist