Beispiel #1
0
 def treatDict(self, obj, raw):
   listItems = raw['items']
   from TuningTools.PreProc import PreProcCollection
   tObj = type(obj)
   for idx, cObj in enumerate(listItems):
     if hasattr( cObj, 'toRawObj' ):
       listItems[idx] = cObj.toRawObj()
   RawDictStreamer.treatDict( self, obj, raw )
   return raw
Beispiel #2
0
 def __call__(self, obj):
   "Return a raw dict object from itself"
   setattr(obj,'items', list(obj))
   self._logger.debug("Added property items to %s with the following list: %r", 
       obj.__class__.__name__,
       obj.__dict__['items'])
   raw = RawDictStreamer.__call__( self, obj )
   obj.__dict__.pop('items')
   return raw