From 7369d56d2af881baa738697c19b8eb1559f47ca2 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Mon, 6 May 2002 04:20:21 +0000 Subject: get_lock_data(): Be sure to os.path.split() the filename because all the useful data is encoded in the last path component. Otherwise the calculation gets messed up if the lock file is something like /usr/local/mailman-2.1/locks/... --- bin/mailmanctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mailmanctl b/bin/mailmanctl index 0f8616dee..016deae5e 100644 --- a/bin/mailmanctl +++ b/bin/mailmanctl @@ -155,7 +155,7 @@ def kill_watcher(sig): def get_lock_data(): """Return the hostname, pid, and tempfile""" fp = open(LOCKFILE) - filename = fp.read().strip() + filename = os.path.split(fp.read().strip())[1] fp.close() parts = filename.split('.') hostname = DOT.join(parts[1:-1]) -- cgit v1.2.3-70-g09d2