]> TLD Linux GIT Repositories - TLD.git/blobdiff - pld-builder.new/PLD_Builder/lock.py
- moved to separate repo
[TLD.git] / pld-builder.new / PLD_Builder / lock.py
diff --git a/pld-builder.new/PLD_Builder/lock.py b/pld-builder.new/PLD_Builder/lock.py
deleted file mode 100644 (file)
index 942cce5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
-
-import fcntl
-
-import path
-
-locks_list = []
-
-def lock(n, non_block = 0):
-    f = open(path.lock_dir + '/' + n, "a")
-    # blah, otherwise it gets garbage collected and doesn't work
-    locks_list.append(f)
-    if non_block:
-        try:
-            fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB)
-        except:
-            f.close()
-            return None
-    else:
-        fcntl.flock(f, fcntl.LOCK_EX)
-    return f