from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_SKIN_IMAGE, SCOPE_FONTS
-class SkinError(str):
- pass
+class SkinError(Exception):
+ def __init__(self, message):
+ self.message = message
+
+ def __str__(self):
+ return self.message
dom_skins = [ ]
guiObject.setPointer(ptr.__deref__(), pos)
elif attrib == 'shadowOffset':
guiObject.setShadowOffset(parsePosition(value))
- elif attrib != 'name':
- print "unsupported attribute " + attrib + "=" + value
+ else:
+ raise "unsupported attribute " + attrib + "=" + value
except int:
# AttributeError:
print "widget %s (%s) doesn't support attribute %s!" % ("", guiObject.__class__.__name__, attrib)
raise SkinError("unsupported stuff : %s" % widget.tagName)
w.skinAttributes = [ ]
- collectAttributes(w.skinAttributes, widget, skin_path_prefix)
+ collectAttributes(w.skinAttributes, widget, skin_path_prefix, ignore=['name'])
# applyAttributes(guiObject, widget, desktop)
# guiObject.thisown = 0