fake_wx: handle missing classname python3
authorGP Orcullo <kinsamanka@gmail.com>
Tue, 21 Feb 2023 12:47:18 +0800
branchpython3
changeset 3790 9ec48ec13b65
parent 3789 8def429216ca
child 3791 c98646b1c981
fake_wx: handle missing classname
fake_wx.py
--- a/fake_wx.py	Mon Feb 20 08:56:25 2023 +0800
+++ b/fake_wx.py	Tue Feb 21 12:47:18 2023 +0800
@@ -11,7 +11,8 @@
 
 class FakeObject:
     def __init__(self, *args, **kwargs):
-        self.__classname__ = kwargs["__classname__"]
+        if "__classname__" in kwargs:
+            self.__classname__ = kwargs["__classname__"]
 
     def __getattr__(self,name):
         if name.startswith('__'):