diff --git a/nova/openstack/common/lockutils.py b/nova/openstack/common/lockutils.py index 9f76ad5d5443..404ef2a02e18 100644 --- a/nova/openstack/common/lockutils.py +++ b/nova/openstack/common/lockutils.py @@ -15,7 +15,6 @@ import contextlib import errno -import fcntl import functools import os import shutil @@ -195,7 +194,9 @@ if os.name == 'nt': FileLock = _WindowsLock else: import base64 + import fcntl import hashlib + import posix_ipc InterProcessLock = _PosixLock 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): - """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 """ with internal_lock(name):