Module: check_mk
Branch: master
Commit: e519bf89f90fa4ed7b7d6339b5fb352ae5b43288
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e519bf89f90fa4…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 24 17:31:35 2014 +0200
New lib function have_lock()
---
web/htdocs/lib.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/web/htdocs/lib.py b/web/htdocs/lib.py
index 409be60..247d3a9 100644
--- a/web/htdocs/lib.py
+++ b/web/htdocs/lib.py
@@ -344,6 +344,9 @@ def release_lock(path):
g_aquired_locks.remove((lock_path, fd))
g_locked_paths.remove(path)
+def have_lock(path):
+ return path in g_locked_paths
+
def release_all_locks():
global g_aquired_locks, g_locked_paths
for path, fd in g_aquired_locks: