misc/migration/3.10.0_Any.py
changeset 11178 b3d3e23be27b
parent 9460 a2a0bc984863
child 11278 19fcce6dc6d1
--- a/misc/migration/3.10.0_Any.py	Mon Mar 07 17:53:20 2016 +0100
+++ b/misc/migration/3.10.0_Any.py	Wed Mar 09 17:01:42 2016 +0100
@@ -1,4 +1,3 @@
-from cubicweb.server.session import hooks_control
 
 for uri, cfg in config.read_sources_file().items():
     if uri in ('system', 'admin'):
@@ -9,7 +8,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()