fix old bug when is not skin_user_skinnane.xml parsed, then is not loaded skin.user...
authorims <ims21@users.sourceforge.net>
Mon, 2 Mar 2015 22:47:59 +0000 (23:47 +0100)
committerlittlesat <littlesat99@yahoo.com>
Tue, 3 Mar 2015 17:02:21 +0000 (18:02 +0100)
Signed-off-by: littlesat <littlesat99@yahoo.com>

skin.py

diff --git a/skin.py b/skin.py
index b69c69a..6fc26aa 100644 (file)
--- a/skin.py
+++ b/skin.py
@@ -83,14 +83,12 @@ if not fileExists(resolveFilename(SCOPE_SKIN, DEFAULT_SKIN)):
 config.skin.primary_skin = ConfigText(default=DEFAULT_SKIN)
 
 profile("LoadSkin")
-try:
-       name = skin_user_skinname()
-       if name is not None:
-               addSkin(name, SCOPE_CONFIG)
-       else:
-               addSkin('skin_user.xml', SCOPE_CONFIG)
-except (SkinError, IOError, AssertionError), err:
-       print "not loading user skin: ", err
+res = None
+name = skin_user_skinname()
+if name:
+       res = addSkin(name, SCOPE_CONFIG)
+if not name or not res:
+       addSkin('skin_user.xml', SCOPE_CONFIG)
 
 # some boxes lie about their dimensions
 addSkin('skin_box.xml')