Changeset 594
- Timestamp:
- 06/28/03 12:34:58 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RBFoundation/RBFoundation/XMLClassBuilder.py
r568 r594 62 62 63 63 class BaseImport(object): 64 retryimport = True 65 64 66 def __init__(self, PyPathRoot=''): 65 67 self.PyPathRoot = PyPathRoot … … 72 74 PyPath = self.PyPathRoot 73 75 module = __import__(PyPath, globals(), {}, Name) 74 result = getattr(module, Name) 75 return result 76 try: 77 return getattr(module, Name) 78 except AttributeError: 79 if self.retryimport: 80 module = reload(module) 81 return getattr(module, Name) 82 raise 76 83 77 84 def __call__(self, owner, parent, node, attributes, namespacemap):
