File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4296,16 +4296,15 @@ def __init__(self, *argv):
42964296 # for whenever a second instance tries to run focus the application.
42974297 self .server = QLocalServer ()
42984298 self .server .listen (self .UUID )
4299- self .server .newConnection .connect (MyForm .on_new_connection )
4299+ self .server .newConnection .connect (self .on_new_connection )
43004300
43014301 self .setStyleSheet ("QStatusBar::item { border: 0px solid black }" )
43024302
43034303 def __del__ (self ):
43044304 if self .server :
43054305 self .server .close ()
43064306
4307- @staticmethod
4308- def on_new_connection ():
4307+ def on_new_connection (self ): # pylint: disable=no-self-use
43094308 if myapp :
43104309 myapp .appIndicatorShow ()
43114310
Original file line number Diff line number Diff line change @@ -40,6 +40,14 @@ def __getattr__(self, attr):
4040 else :
4141 return realRet
4242
43+ def __contains__ (self , key ):
44+ """
45+ Look up inventory item by hash.
46+ This method is needed due to how new-style classes work.
47+ """
48+ self .numberOfInventoryLookupsPerformed += 1
49+ return key in self ._realInventory
50+
4351 def __getitem__ (self , key ):
4452 """hint for pylint, this is dictionary like object"""
4553 return self ._realInventory [key ]
You can’t perform that action at this time.
0 commit comments