libvirt: Remove dead code path in method clear_volume
In oslo.config StrOpt provide parameter choices, that means the option's value must be in the choices, otherewise an exception will be raised. That means volume_clear always in ('none', 'zero', 'shred'), this commit removes the code path which never run. Change-Id: I88e1034a391230cc781cd66911381be2fdea046d Partial-Bug: #1471168
This commit is contained in:
parent
a0923fc4e2
commit
6d86a3eab6
|
@ -237,9 +237,6 @@ def clear_volume(path):
|
|||
elif volume_clear == 'shred':
|
||||
utils.execute('shred', '-n3', '-s%d' % volume_size, path,
|
||||
run_as_root=True)
|
||||
else:
|
||||
raise exception.Invalid(_("volume_clear='%s' is not handled")
|
||||
% volume_clear)
|
||||
|
||||
|
||||
def remove_volumes(paths):
|
||||
|
|
Loading…
Reference in New Issue