diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2007-11-01 17:06:36 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2007-11-01 17:06:36 +0000 |
| commit | d97c5ff00f3017ac656be9608307c002b8bc50b0 (patch) | |
| tree | be4fc78c2f2559325fe1eccba55ad16fcc931124 | |
| parent | 5b5fab0065f7b922b03b66d5b40e680a1960d1ca (diff) | |
| download | enigma2-d97c5ff00f3017ac656be9608307c002b8bc50b0.tar.gz enigma2-d97c5ff00f3017ac656be9608307c002b8bc50b0.zip | |
raise SkinErrors instead of string
| -rw-r--r-- | skin.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -76,7 +76,7 @@ def parseColor(str): try: return colorNames[str] except: - raise ("color '%s' must be #aarrggbb or valid named color" % (str)) + raise SkinError("color '%s' must be #aarrggbb or valid named color" % (str)) return gRGB(int(str[1:], 0x10)) def collectAttributes(skinAttributes, node, skin_path_prefix=None, ignore=[]): @@ -98,7 +98,7 @@ def collectAttributes(skinAttributes, node, skin_path_prefix=None, ignore=[]): def loadPixmap(path): ptr = loadPNG(path) if ptr is None: - raise "pixmap file %s not found!" % (path) + raise SkinError("pixmap file %s not found!" % (path)) return ptr def applySingleAttribute(guiObject, desktop, attrib, value): @@ -199,7 +199,7 @@ def applySingleAttribute(guiObject, desktop, attrib, value): elif attrib == 'noWrap': guiObject.setNoWrap(1) else: - raise "unsupported attribute " + attrib + "=" + value + raise SkinError("unsupported attribute " + attrib + "=" + value) except int: # AttributeError: print "widget %s (%s) doesn't support attribute %s!" % ("", guiObject.__class__.__name__, attrib) |
