From 3a0150442b44fcabc877a88f0791b3e051a7412f Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Tue, 25 May 2010 13:03:35 -0400 Subject: [PATCH] Allow for pidfiles in $CWD --- gunicorn/pidfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/pidfile.py b/gunicorn/pidfile.py index 0b8f00be..bbdf1456 100644 --- a/gunicorn/pidfile.py +++ b/gunicorn/pidfile.py @@ -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)