Merge "Sync oslo lockutils to nova"
This commit is contained in:
		| @@ -15,7 +15,6 @@ | |||||||
|  |  | ||||||
| import contextlib | import contextlib | ||||||
| import errno | import errno | ||||||
| import fcntl |  | ||||||
| import functools | import functools | ||||||
| import os | import os | ||||||
| import shutil | import shutil | ||||||
| @@ -195,7 +194,9 @@ if os.name == 'nt': | |||||||
|     FileLock = _WindowsLock |     FileLock = _WindowsLock | ||||||
| else: | else: | ||||||
|     import base64 |     import base64 | ||||||
|  |     import fcntl | ||||||
|     import hashlib |     import hashlib | ||||||
|  |  | ||||||
|     import posix_ipc |     import posix_ipc | ||||||
|     InterProcessLock = _PosixLock |     InterProcessLock = _PosixLock | ||||||
|     FileLock = _FcntlLock |     FileLock = _FcntlLock | ||||||
| @@ -239,7 +240,7 @@ def external_lock(name, lock_file_prefix=None, lock_path=None): | |||||||
|  |  | ||||||
|  |  | ||||||
| def remove_external_lock_file(name, lock_file_prefix=None): | def remove_external_lock_file(name, lock_file_prefix=None): | ||||||
|     """Remove a external lock file when it's not used anymore |     """Remove an external lock file when it's not used anymore | ||||||
|     This will be helpful when we have a lot of lock files |     This will be helpful when we have a lot of lock files | ||||||
|     """ |     """ | ||||||
|     with internal_lock(name): |     with internal_lock(name): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jenkins
					Jenkins