diff options
author | Thiago Brito <thiago.brito@windriver.com> | 2022-03-24 15:11:57 -0300 |
---|---|---|
committer | Thiago Brito <thiago.brito@windriver.com> | 2022-03-24 15:13:48 -0300 |
commit | 11210a957c7f21defbbc46826210d93b295cce18 (patch) | |
tree | 50e882cbf9b81caf034024ae9677637f3a188f66 | |
parent | 51a43dacc439ca257186bc7c3f0710932bfa1abe (diff) | |
download | oslo-concurrency-11210a957c7f21defbbc46826210d93b295cce18.tar.gz |
Fix RequiredOptError when missing lock_path
When lock_file is not present on the [oslo_concurrency] section of the
config file, we are getting a misleading error saying that it is not
preset on the DEFAULT group. This commit fixes it by providing the group
arg to the RequiredOptError constructor.
Closes-Bug: #1966320
Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: Idee6987739917c7eae4faee15a66085a9ef7f6d2
-rw-r--r-- | oslo_concurrency/lockutils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oslo_concurrency/lockutils.py b/oslo_concurrency/lockutils.py index 1a9abe8..c75d3a3 100644 --- a/oslo_concurrency/lockutils.py +++ b/oslo_concurrency/lockutils.py @@ -180,7 +180,7 @@ def _get_lock_path(name, lock_file_prefix, lock_path=None): local_lock_path = lock_path or CONF.oslo_concurrency.lock_path if not local_lock_path: - raise cfg.RequiredOptError('lock_path') + raise cfg.RequiredOptError('lock_path', 'oslo_concurrency') return os.path.join(local_lock_path, name) |