]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/wxpTag.py
added a test to check how exception handling works with Win32 SEH; corrected copyright
[wxWidgets.git] / wxPython / wx / lib / wxpTag.py
index d93a9fa9b10792117cb811c7471da57f6dfa255f..65e1b58ad2cb4cb4b42db3915b4eedb1b08a1eb1 100644 (file)
@@ -195,7 +195,7 @@ class wxpTagHandler(wx.html.HtmlWinTagHandler):
 
 
         # check for something that should be evaluated
-        elif value[0] in '[{(' or value[:2] == 'wx':
+        elif value and value[0] in '[{(' or value[:2] == 'wx':
             saveVal = value
             try:
                 value = eval(value, self.ctx.classMod.__dict__)
@@ -203,7 +203,7 @@ class wxpTagHandler(wx.html.HtmlWinTagHandler):
                 value = saveVal
 
         # convert to wx.Colour
-        elif value[0] == '#':
+        elif value and value[0] == '#':
             try:
                 red   = int('0x'+value[1:3], 16)
                 green = int('0x'+value[3:5], 16)
@@ -212,7 +212,8 @@ class wxpTagHandler(wx.html.HtmlWinTagHandler):
             except:
                 pass
 
-        self.ctx.kwargs[str(name)] = value
+        if self.ctx:
+          self.ctx.kwargs[str(name)] = value
         return False