force debug mode on cubicweb-ctl start on win32 stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Mon, 26 Oct 2009 10:04:18 +0100
branchstable
changeset 3786 11d98118f0eb
parent 3785 78909a156011
child 3787 82bb2c7f083b
force debug mode on cubicweb-ctl start on win32 this prevents a crash (daemon mode not yet supported)
server/serverctl.py
--- a/server/serverctl.py	Fri Oct 23 15:43:30 2009 +0200
+++ b/server/serverctl.py	Mon Oct 26 10:04:18 2009 +0100
@@ -465,6 +465,12 @@
         from cubicweb.server.server import RepositoryServer
         appid = pop_arg(args, msg='No instance specified !')
         config = ServerConfiguration.config_for(appid)
+        if sys.platform == 'win32':
+            if not self.config.debug:
+                from logging import getLogger
+                logger = getLogger('cubicweb.ctl')
+                logger.info('Forcing debug mode on win32 platform')
+                self.config.debug = True
         debug = self.config.debug
         # create the server
         server = RepositoryServer(config, debug)