def is_tdir_locked(path): try: with windows_open(os.path.join(path, TDIR_LOCK)): pass except OSError: return True return False
def is_tdir_locked(path): try: with windows_open(os.path.join(path, TDIR_LOCK)): pass except EnvironmentError: return True return False
def lock_tdir(path): return windows_open(os.path.join(path, TDIR_LOCK))