cwconfig.py
changeset 5960 ffa38c4ec592
parent 5933 3d707b8f8a4d
child 6087 bdfbd6aa5758
--- a/cwconfig.py	Mon Jul 12 12:28:44 2010 +0200
+++ b/cwconfig.py	Mon Jul 12 12:55:43 2010 +0200
@@ -914,10 +914,14 @@
         """return default path to the pid file of the instance'server"""
         if self.mode == 'system':
             # XXX not under _INSTALL_PREFIX, right?
-            rtdir = env_path('CW_RUNTIME_DIR', '/var/run/cubicweb/', 'run time')
+            default = '/var/run/cubicweb/'
         else:
             import tempfile
-            rtdir = env_path('CW_RUNTIME_DIR', tempfile.gettempdir(), 'run time')
+            default = tempfile.gettempdir()
+        # runtime directory created on startup if necessary, don't check it
+        # exists
+        rtdir = env_path('CW_RUNTIME_DIR', default, 'run time',
+                         checkexists=False)
         return join(rtdir, '%s-%s.pid' % (self.appid, self.name))
 
     # instance methods used to get instance specific resources #############