|
|
@ -1,6 +1,9 @@
|
|
|
|
# Copyright (c) 2018, Ansible Project
|
|
|
|
# Copyright (c) 2018, Ansible Project
|
|
|
|
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
|
|
|
|
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
|
|
|
|
|
|
import errno
|
|
|
|
import errno
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import stat
|
|
|
|
import stat
|
|
|
@ -29,7 +32,7 @@ class LockTimeout(Exception):
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class FileLock():
|
|
|
|
class FileLock:
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
Currently FileLock is implemented via fcntl.flock on a lock file, however this
|
|
|
|
Currently FileLock is implemented via fcntl.flock on a lock file, however this
|
|
|
|
behaviour may change in the future. Avoid mixing lock types fcntl.flock,
|
|
|
|
behaviour may change in the future. Avoid mixing lock types fcntl.flock,
|
|
|
|