X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=python%2Fovs%2Fdaemon.py;h=da7eb8aed99035b34b87183a2a70e5f8104c84ea;hb=63b1a5213331cd962be05df57f1375db902216c5;hp=149c8a1d8963a82122e19b2a794526a8928e63e8;hpb=523a3bc7733b13cbfb4b702739cd26d0c29b05f7;p=openvswitch diff --git a/python/ovs/daemon.py b/python/ovs/daemon.py index 149c8a1d..da7eb8ae 100644 --- a/python/ovs/daemon.py +++ b/python/ovs/daemon.py @@ -75,8 +75,7 @@ def set_pidfile(name): def get_pidfile(): """Returns an absolute path to the configured pidfile, or None if no - pidfile is configured. The caller must not modify or free the returned - string.""" + pidfile is configured.""" return _pidfile def set_no_chdir(): @@ -423,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))