cubicweb/misc/migration/3.10.0_Any.py
changeset 11279 e4f11ef1face
parent 11278 19fcce6dc6d1
parent 11057 0b59724cb3f2
child 12142 db2fc87348ab
--- a/cubicweb/misc/migration/3.10.0_Any.py	Fri Jun 10 16:45:20 2016 +0200
+++ b/cubicweb/misc/migration/3.10.0_Any.py	Thu Jun 16 15:53:01 2016 +0200
@@ -1,7 +1,5 @@
 from six import text_type
 
-from cubicweb.server.session import hooks_control
-
 for uri, cfg in config.read_sources_file().items():
     if uri in ('system', 'admin'):
         continue
@@ -11,7 +9,7 @@
 add_relation_definition('CWSource', 'cw_source', 'CWSource')
 add_entity_type('CWSourceHostConfig')
 
-with hooks_control(session, session.HOOKS_ALLOW_ALL, 'cw.sources'):
+with session.allow_all_hooks_but('cw.sources'):
     create_entity('CWSource', type=u'native', name=u'system')
 commit()