Changeset 3932 for waeup/branches/ulif-rewrite/src
- Timestamp:
- 7 Feb 2009, 14:36:04 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/utils/importexport.py
r3856 r3932 41 41 42 42 43 ts_regexp = re.compile('^< type(.*)>$')43 ts_regexp = re.compile('^<((type)|(class)) (.*)>$') 44 44 def getTypeString(obj): 45 45 type_str = str(type(obj)) 46 46 m = ts_regexp.match(type_str).groups() 47 return m[0][1:-1]47 return (m[0], m[3][1:-1]) 48 48 49 49 … … 82 82 if name.startswith('_'): 83 83 continue 84 val = unicode(getattr(obj, 'name')) 85 type_name = getTypeString(getattr(obj, 'name')) 84 val = unicode(getattr(obj, name)) 85 type_type, type_name = getTypeString(getattr(obj, name)) 86 if type_type not in ['type',]: 87 # XXX: if type_type == 'class', we should deliver an object. 88 continue 86 89 newnode = self.doc.createElement('attribute') 87 90 newnode.setAttribute('name', name)
Note: See TracChangeset for help on using the changeset viewer.