Beispiel #1
0
 def __setitem__ (self,name,asset):
     check_name(name)
     if not isinstance(asset,BaseAsset):
         raise Exception('The asset "%s" must be an instance of BaseAsset'%asset)
     self._assets[name] = asset
Beispiel #2
0
 def __setitem__(self, name, processor):
     check_name(name)
     if isinstance(processor, basestring):
         processor = load_processor(processor)
     self._processors[name] = processor(self.environment)