From e0ddb81358ec879aacc4e84e71f3b39bb5e7cbfe Mon Sep 17 00:00:00 2001 From: Anuradha Kulkarni Date: Fri, 1 Oct 2021 15:25:37 -0400 Subject: [PATCH] mgr/volumes/fs/operations : Fix flake8 issues Fixes : https://tracker.ceph.com/issues/51396 Signed-off-by: Anuradha Kulkarni --- src/pybind/mgr/volumes/fs/operations/clone_index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/volumes/fs/operations/clone_index.py b/src/pybind/mgr/volumes/fs/operations/clone_index.py index a2b31f858e0..f5a850638d8 100644 --- a/src/pybind/mgr/volumes/fs/operations/clone_index.py +++ b/src/pybind/mgr/volumes/fs/operations/clone_index.py @@ -1,7 +1,6 @@ import os import uuid import stat -import errno import logging from contextlib import contextmanager @@ -13,6 +12,7 @@ from ..fs_util import list_one_entry_at_a_time log = logging.getLogger(__name__) + class CloneIndex(Index): SUB_GROUP_NAME = "clone" PATH_MAX = 4096 @@ -81,6 +81,7 @@ class CloneIndex(Index): except cephfs.Error as e: raise IndexException(-e.args[0], e.args[1]) + def create_clone_index(fs, vol_spec): clone_index = CloneIndex(fs, vol_spec) try: @@ -88,6 +89,7 @@ def create_clone_index(fs, vol_spec): except cephfs.Error as e: raise IndexException(-e.args[0], e.args[1]) + @contextmanager def open_clone_index(fs, vol_spec): clone_index = CloneIndex(fs, vol_spec) -- 2.39.5