Skip to content

Commit 6fbfc14

Browse files
committed
In setup_pidfuile, if path is relative to . (i.e. -p my.pid) then os.path.dirname results in an empty string with os.makedirs will choke on.
1 parent 87161c2 commit 6fbfc14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyres/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def setup_pidfile(path):
6565
if not path:
6666
return
6767
dirname = os.path.dirname(path)
68-
if not os.path.exists(dirname):
68+
if dirname and not os.path.exists(dirname):
6969
os.makedirs(dirname)
7070
with open(path, 'w') as f:
7171
f.write(str(os.getpid()))

0 commit comments

Comments
 (0)