]> git.nothing2do.fr Git - get-hack-src.git/commitdiff
Update src/canari/utils/fs.py
authorallfro <ndouba@gmail.com>
Thu, 24 Jan 2013 18:35:57 +0000 (13:35 -0500)
committerallfro <ndouba@gmail.com>
Thu, 24 Jan 2013 18:35:57 +0000 (13:35 -0500)
added fake LOCK_UN for NT

src/canari/utils/fs.py

index b325377b4041ba73e177e32f6022dd83db9d26ff..14959345b9a3a18b246f4b6ae857a6293bf999b5 100644 (file)
@@ -14,6 +14,7 @@ if os.name == 'nt':
     LOCK_SH = 0    # the default
     LOCK_NB = 0x1  # LOCKFILE_FAIL_IMMEDIATELY
     LOCK_EX = 0x2  # LOCKFILE_EXCLUSIVE_LOCK
+    LOCK_UN = 0x4  # Unlock file. Not in NT API, just needs to be there.
 
     # --- the code is taken from pyserial project ---
     #
@@ -144,4 +145,4 @@ class ufile(file):
 
 
 def age(path):
-    return time() - os.stat(path).st_mtime
\ No newline at end of file
+    return time() - os.stat(path).st_mtime