mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Pythn 2.7+: open arg defaults to r
This commit is contained in:
parent
78ef73b63e
commit
ec85b32d3b
@ -51,7 +51,7 @@ class Pidfile:
|
||||
def unlink(self):
|
||||
""" delete pidfile"""
|
||||
try:
|
||||
with open(self.fname, "r") as f:
|
||||
with open(self.fname) as f:
|
||||
pid1 = int(f.read() or 0)
|
||||
|
||||
if pid1 == self.pid:
|
||||
@ -64,7 +64,7 @@ class Pidfile:
|
||||
if not self.fname:
|
||||
return
|
||||
try:
|
||||
with open(self.fname, "r") as f:
|
||||
with open(self.fname) as f:
|
||||
try:
|
||||
wpid = int(f.read())
|
||||
except ValueError:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user