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:
@@ -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))
|
||||
|
Reference in New Issue
Block a user