]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix lockpath removal in Python lxc-ls
authorChristian Brauner <christian.brauner@mailbox.org>
Mon, 11 Jan 2016 13:43:42 +0000 (14:43 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 17 Nov 2016 22:44:02 +0000 (17:44 -0500)
The lock path for lxc is not

RUNTIME_PATH/lock/lxc

but rather

RUNTIME_PATH/lxc/lock

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc-ls.in

index ac762caae382a77b1987a14fc40621035e2b7963..cbd76455d8df2dc8ef4df77ff4a4f231c53e0fce 100755 (executable)
@@ -353,7 +353,7 @@ def get_containers(fd=None, base="/", root=False):
                 else:
                     def clear_lock():
                         try:
-                            lock_path = "%s/lock/lxc/%s/%s" % (RUNTIME_PATH,
+                            lock_path = "%s/lxc/lock/%s/%s" % (RUNTIME_PATH,
                                                                path,
                                                                entry['name'])
                             if os.path.exists(lock_path):