equal
deleted
inserted
replaced
254 if oid: |
254 if oid: |
255 self.register(obj) |
255 self.register(obj) |
256 |
256 |
257 def register(self, obj, registryname=None, oid=None, clear=False): |
257 def register(self, obj, registryname=None, oid=None, clear=False): |
258 """base method to add an object in the registry""" |
258 """base method to add an object in the registry""" |
|
259 assert not '__abstract__' in obj.__dict__ |
259 registryname = registryname or obj.__registry__ |
260 registryname = registryname or obj.__registry__ |
260 oid = oid or obj.id |
261 oid = oid or obj.id |
261 registry = self._registries.setdefault(registryname, {}) |
262 registry = self._registries.setdefault(registryname, {}) |
262 if clear: |
263 if clear: |
263 vobjects = registry[oid] = [] |
264 vobjects = registry[oid] = [] |