Merge "Check return of _load_state" into feature/v2
This commit is contained in:
commit
0f224d3ae6
@ -188,6 +188,8 @@ class BlockDevice(object):
|
|||||||
"""Cleanup all remaining relicts - in good case"""
|
"""Cleanup all remaining relicts - in good case"""
|
||||||
|
|
||||||
dg, reverse_order, state = self._load_state()
|
dg, reverse_order, state = self._load_state()
|
||||||
|
if dg is None:
|
||||||
|
return 0
|
||||||
for node in reverse_order:
|
for node in reverse_order:
|
||||||
node.cleanup(state)
|
node.cleanup(state)
|
||||||
|
|
||||||
@ -200,6 +202,8 @@ class BlockDevice(object):
|
|||||||
"""Cleanup all remaining relicts - in case of an error"""
|
"""Cleanup all remaining relicts - in case of an error"""
|
||||||
|
|
||||||
dg, reverse_order, state = self._load_state()
|
dg, reverse_order, state = self._load_state()
|
||||||
|
if dg is None:
|
||||||
|
return 0
|
||||||
for node in reverse_order:
|
for node in reverse_order:
|
||||||
node.delete(state)
|
node.delete(state)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user