##// END OF EJS Templates
pidlock always create dirs for lock file
marcink -
r2568:29e999f2 beta
parent child Browse files
Show More
@@ -8,6 +8,7 b' from multiprocessing.util import Finaliz'
8
8
9 from rhodecode.lib.compat import kill
9 from rhodecode.lib.compat import kill
10
10
11
11 class LockHeld(Exception):
12 class LockHeld(Exception):
12 pass
13 pass
13
14
@@ -123,6 +124,10 b' class DaemonLock(object):'
123 """
124 """
124 if self.debug:
125 if self.debug:
125 print 'creating a file %s and pid: %s' % (pidfile, lockname)
126 print 'creating a file %s and pid: %s' % (pidfile, lockname)
127
128 dir_, file_ = os.path.split(pidfile)
129 if not os.path.isdir(dir_):
130 os.makedirs(dir_)
126 pidfile = open(self.pidfile, "wb")
131 pidfile = open(self.pidfile, "wb")
127 pidfile.write(lockname)
132 pidfile.write(lockname)
128 pidfile.close
133 pidfile.close
General Comments 0
You need to be logged in to leave comments. Login now