From: allfro Date: Thu, 24 Jan 2013 18:35:57 +0000 (-0500) Subject: Update src/canari/utils/fs.py X-Git-Url: https://git.nothing2do.fr/?a=commitdiff_plain;h=6099e064536a7c88f769c4de9b7eb825df2776a3;p=get-hack-src.git Update src/canari/utils/fs.py added fake LOCK_UN for NT --- diff --git a/src/canari/utils/fs.py b/src/canari/utils/fs.py index b325377..1495934 100644 --- a/src/canari/utils/fs.py +++ b/src/canari/utils/fs.py @@ -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