# HG changeset patch # User Sylvain Thénault # Date 1269606042 -3600 # Node ID 8469d0acd94997928ed98e22c67ce96045992860 # Parent 4781870e97d9003a6f91c0a92975f6b5e3eb9ac3 [i18ncube] clear_rtag_objects imported when generating cube's .po file diff -r 4781870e97d9 -r 8469d0acd949 cwvreg.py --- a/cwvreg.py Fri Mar 26 09:19:09 2010 +0100 +++ b/cwvreg.py Fri Mar 26 13:20:42 2010 +0100 @@ -21,6 +21,9 @@ from cubicweb.vregistry import VRegistry, Registry, class_regid from cubicweb.rtags import RTAGS +def clear_rtag_objects(): + for rtag in RTAGS: + rtag.clear() def use_interfaces(obj): """return interfaces used by the given object by searching for implements @@ -262,10 +265,7 @@ if self.config.mode != 'test': # don't clear rtags during test, this may cause breakage with # manually imported appobject modules - @onevent('before-registry-reload') - def clear_rtag_objects(): - for rtag in RTAGS: - rtag.clear() + CW_EVENT_MANAGER.bind('before-registry-reload', clear_rtag_objects) def setdefault(self, regid): try: