[hooks] fix deprecation warnings for old hook classes
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 23 Sep 2009 09:48:34 +0200
changeset 3391 b6564d9ca872
parent 3390 ae50bd4b1631
child 3392 36bcf206e157
[hooks] fix deprecation warnings for old hook classes
server/hooksmanager.py
--- a/server/hooksmanager.py	Wed Sep 23 09:47:04 2009 +0200
+++ b/server/hooksmanager.py	Wed Sep 23 09:48:34 2009 +0200
@@ -1,8 +1,10 @@
 from logilab.common.deprecation import class_renamed, class_moved
-from cubicweb.server.hook import Hook
-SystemHook = class_renamed('SystemHook', Hook)
-PropagateSubjectRelationHook = class_renamed('PropagateSubjectRelationHook', Hook)
-PropagateSubjectRelationAddHook = class_renamed('PropagateSubjectRelationAddHook', Hook)
-PropagateSubjectRelationDelHook = class_renamed('PropagateSubjectRelationDelHook', Hook)
-Hook = class_moved(Hook)
-
+from cubicweb.server import hook
+SystemHook = class_renamed('SystemHook', hook.Hook)
+PropagateSubjectRelationHook = class_renamed('PropagateSubjectRelationHook',
+                                             hook.PropagateSubjectRelationHook)
+PropagateSubjectRelationAddHook = class_renamed('PropagateSubjectRelationAddHook',
+                                                hook.PropagateSubjectRelationAddHook)
+PropagateSubjectRelationDelHook = class_renamed('PropagateSubjectRelationDelHook',
+                                                hook.PropagateSubjectRelationDelHook)
+Hook = class_moved(hook.Hook)