Allow for pidfiles in $CWD

This commit is contained in:
Paul J. Davis 2010-05-25 13:03:35 -04:00
parent b0c390ec22
commit 3a0150442b

View File

@ -33,7 +33,7 @@ class Pidfile(object):
# Write pidfile
fdir = os.path.dirname(self.fname)
if not os.path.isdir(fdir):
if fdir and not os.path.isdir(fdir):
raise RuntimeError("%s doesn't exist. Can't create pidfile." % fdir)
fd, fname = tempfile.mkstemp(dir=fdir)
os.write(fd, "%s\n" % self.pid)