cubicweb/devtools/__init__.py
changeset 11195 5de859b95988
parent 11129 97095348b3ee
child 11259 84e2a1121f4b
--- a/cubicweb/devtools/__init__.py	Wed Mar 09 14:11:47 2016 +0100
+++ b/cubicweb/devtools/__init__.py	Thu Jun 12 15:54:44 2014 +0200
@@ -106,13 +106,7 @@
     * system source is shutdown
     """
     if not repo._needs_refresh:
-        for sessionid in list(repo._sessions):
-            warnings.warn('%s Open session found while turning repository off'
-                          %sessionid, RuntimeWarning)
-            try:
-                repo.close(sessionid)
-            except BadConnectionId: #this is strange ? thread issue ?
-                print('XXX unknown session', sessionid)
+        repo.close_sessions()
         for cnxset in repo.cnxsets:
             cnxset.close(True)
         repo.system_source.shutdown()