pylint: tidy up clean_volume_locks
Initialize set_clean to False so it always has a value in
the except block.
@@ -196,6 +196,7 @@ MAPPING = {
def clean_volume_locks(func):
@functools.wraps(func)
def wrapper(self, context, volume, *args, **kwargs):
+ skip_clean = False
try:
skip_clean = func(self, context, volume, *args, **kwargs)
except Exception:
@@ -213,6 +214,7 @@ def clean_volume_locks(func):
def clean_snapshot_locks(func):
@functools.wraps(func)
def wrapper(self, context, snapshot, *args, **kwargs):
+ skip_clean = False
try:
skip_clean = func(self, context, snapshot, *args, **kwargs)
except Exception:
