Changeset 59795 in vbox for trunk/src/libs/xpcom18a4/python/server/loader.py
- Timestamp:
- Feb 24, 2016 9:13:27 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 105674
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/server/loader.py
r59769 r59795 38 38 import xpcom 39 39 from xpcom import components, logger 40 from . import module 41 import glob 42 import os 40 41 import module 42 43 import glob, os, types 44 43 45 from xpcom.client import Component 44 46 … … 55 57 # For now, just run over all classes looking for likely candidates. 56 58 comps = [] 57 for name, object in list(py_module.__dict__.items()):59 for name, object in py_module.__dict__.items(): 58 60 try: 59 if (type(object) == type or issubclass(object, object)) and \61 if (type(object) == types.ClassType or issubclass(object, object)) and \ 60 62 _has_good_attr(object, "_com_interfaces_") and \ 61 63 _has_good_attr(object, "_reg_clsid_") and \ … … 146 148 self.autoRegisterComponent(when, entry) 147 149 # Handle some common user errors 148 except xpcom.COMException asdetails:150 except xpcom.COMException, details: 149 151 from xpcom import nsError 150 152 # If the interface name does not exist, suppress the traceback … … 154 156 else: 155 157 logger.exception("Registration of '%s' failed!", entry.leafName) 156 except SyntaxError asdetails:158 except SyntaxError, details: 157 159 # Syntax error in source file - no useful traceback here either. 158 160 logger.error("Registration of '%s' failed\n %s", … … 224 226 225 227 def MakePythonComponentLoaderModule(serviceManager, nsIFile): 226 from .import module228 import module 227 229 return module.Module( [PythonComponentLoader] )
Note:
See TracChangeset
for help on using the changeset viewer.