2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

daemon: Stylistic improvement for __read_pidfile in Python implementation.

Suggested-by: Reid Price <reid@nicira.com>
This commit is contained in:
Ben Pfaff
2011-08-22 14:40:09 -07:00
parent a7675d4e56
commit 0233401f12

View File

@@ -422,10 +422,10 @@ def __read_pidfile(pidfile, delete_if_stale):
logging.warning("%s: failed to delete stale pidfile"
% (pidfile, e.strerror))
return -e.errno
logging.debug("%s: deleted stale pidfile" % pidfile)
file.close()
return 0
else:
logging.debug("%s: deleted stale pidfile" % pidfile)
file.close()
return 0
except IOError, e:
if e.errno not in [errno.EACCES, errno.EAGAIN]:
logging.warn("%s: fcntl: %s" % (pidfile, e.strerror))