aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-06-06 01:52:18 +0200
committerghost <andreas.monzner@multimedia-labs.de>2010-06-06 01:52:18 +0200
commitf7a3796a9a0f2d5e9fad4c4974193a55a8bae08f (patch)
tree1e6e845e79814e7725ac65491dd94fc1848948cd
parent7f65493b92e7e5a10c49cb4de595f6449382ffc8 (diff)
downloadenigma2-f7a3796a9a0f2d5e9fad4c4974193a55a8bae08f.tar.gz
enigma2-f7a3796a9a0f2d5e9fad4c4974193a55a8bae08f.zip
skin.py: another fix
-rwxr-xr-xskin.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/skin.py b/skin.py
index a20f3eb8..b490f739 100755
--- a/skin.py
+++ b/skin.py
@@ -402,10 +402,10 @@ def lookupScreen(name, style_id):
# first, find the corresponding screen element
for x in skin.findall("screen"):
if x.attrib.get('name', '') == name:
- screen_style_id = x.attrib.get('id', None)
- if screen_style_id is None and name.find('ummary') > 0:
- screen_style_id = 1
- if screen_style_id is None or int(screen_style_id) == style_id:
+ screen_style_id = x.attrib.get('id', '-1')
+ if screen_style_id == '-1' and name.find('ummary') > 0:
+ screen_style_id = '1'
+ if (style_id != 2 and int(screen_style_id) == -1) or int(screen_style_id) == style_id:
return x, path
return None, None
@@ -440,9 +440,10 @@ def readSkin(screen, skin, names, desktop):
skin_tuple = (skin_tuple,)
for sskin in skin_tuple:
parsedSkin = xml.etree.cElementTree.fromstring(sskin)
- screen_style_id = parsedSkin.attrib.get('id', None)
- if style_id != 2 or screen_style_id is None or int(screen_style_id) == style_id:
+ screen_style_id = parsedSkin.attrib.get('id', '-1')
+ if (style_id != 2 and int(screen_style_id) == -1) or int(screen_style_id) == style_id:
myscreen = screen.parsedSkin = parsedSkin
+ break
#assert myscreen is not None, "no skin for screen '" + repr(names) + "' found!"
if myscreen is None: