Changeset 103329 in vbox
- Timestamp:
- Feb 13, 2024 1:33:35 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/python/vboxapi.py
r103072 r103329 147 147 indices, lengths) = self.collector.queryMetricsData(names, objects) 148 148 out = [] 149 for i in enumerate(names_out):149 for i, _ in enumerate(names_out): 150 150 scale = int(scales[i]) 151 151 if scale != 1: … … 473 473 # Hack the COM dispatcher base class so we can modify method and 474 474 # attribute names to match those in xpcom. 475 if 'getattr' not in _g_dCOMForward: 476 _g_dCOMForward['getattr'] = DispatchBaseClass.__dict__['__getattr__'] 475 if 'setattr' not in _g_dCOMForward: 476 _g_dCOMForward['getattr'] = DispatchBaseClass.__dict__['__getattr__'] # before setattr which we test for. 477 _g_dCOMForward['setattr'] = DispatchBaseClass.__dict__['__setattr__'] 477 478 setattr(DispatchBaseClass, '__getattr__', _CustomGetAttr) 478 479 if 'setattr' not in _g_dCOMForward:480 _g_dCOMForward['setattr'] = DispatchBaseClass.__dict__['__setattr__']481 479 setattr(DispatchBaseClass, '__setattr__', _CustomSetAttr) 482 480 … … 586 584 587 585 def createListener(self, oImplClass, dArgs): 586 _ = oImplClass; _ = dArgs; 588 587 raise Exception('no active listeners on Windows as PyGatewayBase::QueryInterface() ' 589 588 'returns new gateway objects all the time, thus breaking EventQueue ' … … 769 768 notDocumentedDict['BaseClass'] = oImplClass 770 769 notDocumentedDict['dArgs'] = dArgs 771 sEval = ""770 sEval = "" 772 771 sEval += "import xpcom.components\n" 773 772 sEval += "class ListenerImpl(BaseClass):\n" … … 902 901 notDocumentedDict = {} 903 902 notDocumentedDict['oIUnknown'] = oIUnknown 904 sEval = ""903 sEval = "" 905 904 sEval += "from VirtualBox_wrappers import " + sClassName + "\n" 906 905 sEval += "result = " + sClassName + "(oIUnknown.mgr, oIUnknown.handle)\n" … … 943 942 # This is reinitalized whenever VirtualBoxManager is called, so it will hold 944 943 # the reference to the error exception class for the last platform/style that 945 # was used. Most clients does talk to multiple VBox instance on different944 # was used. Most clients does not talk to multiple VBox instance on different 946 945 # platforms at the same time, so this should be sufficent for most uses and 947 946 # be way simpler to use than VirtualBoxManager::oXcptClass. 948 g_ curXcptClass = None947 g_oCurXcptClass = None 949 948 950 949 … … 1005 1004 ## The exception class for the selected platform. 1006 1005 self.oXcptClass = self.platform.xcptGetBaseXcpt() 1007 global g_ curXcptClass1008 g_ curXcptClass = self.oXcptClass1006 global g_oCurXcptClass 1007 g_oCurXcptClass = self.oXcptClass 1009 1008 1010 1009 # Get the virtualbox singleton.
Note:
See TracChangeset
for help on using the changeset viewer.