Skip to content

Commit ec85b32

Browse files
committed
Pythn 2.7+: open arg defaults to r
1 parent 78ef73b commit ec85b32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gunicorn/pidfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def rename(self, path):
5151
def unlink(self):
5252
""" delete pidfile"""
5353
try:
54-
with open(self.fname, "r") as f:
54+
with open(self.fname) as f:
5555
pid1 = int(f.read() or 0)
5656

5757
if pid1 == self.pid:
@@ -64,7 +64,7 @@ def validate(self):
6464
if not self.fname:
6565
return
6666
try:
67-
with open(self.fname, "r") as f:
67+
with open(self.fname) as f:
6868
try:
6969
wpid = int(f.read())
7070
except ValueError:

0 commit comments

Comments
 (0)