equal
deleted
inserted
replaced
14 # details. |
14 # details. |
15 # |
15 # |
16 # You should have received a copy of the GNU Lesser General Public License along |
16 # You should have received a copy of the GNU Lesser General Public License along |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
18 """server.serverconfig definition""" |
18 """server.serverconfig definition""" |
|
19 from __future__ import print_function |
19 |
20 |
20 __docformat__ = "restructuredtext en" |
21 __docformat__ = "restructuredtext en" |
21 |
22 |
22 import sys |
23 import sys |
23 from os.path import join, exists |
24 from os.path import join, exists |
274 if self.sources_mode is not None: |
275 if self.sources_mode is not None: |
275 if 'migration' in self.sources_mode: |
276 if 'migration' in self.sources_mode: |
276 assert len(self.sources_mode) == 1 |
277 assert len(self.sources_mode) == 1 |
277 if source.connect_for_migration: |
278 if source.connect_for_migration: |
278 return True |
279 return True |
279 print 'not connecting to source', source.uri, 'during migration' |
280 print('not connecting to source', source.uri, 'during migration') |
280 return False |
281 return False |
281 if 'all' in self.sources_mode: |
282 if 'all' in self.sources_mode: |
282 assert len(self.sources_mode) == 1 |
283 assert len(self.sources_mode) == 1 |
283 return True |
284 return True |
284 return source.uri in self.sources_mode |
285 return source.uri in self.sources_mode |