Merge pull request #208 from KamilLepek/unregister_volume_fix

Removed wrong status check during unregister_volume_type in pyocf.
This commit is contained in:
Daniel Madej 2019-06-27 14:58:06 +02:00 committed by GitHub
commit 647601c514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,11 +74,9 @@ class OcfCtx:
if not vol_type.type_id: if not vol_type.type_id:
raise Exception("Already unregistered") raise Exception("Already unregistered")
result = self.lib.ocf_ctx_unregister_volume_type( self.lib.ocf_ctx_unregister_volume_type(
self.ctx_handle, vol_type.type_id self.ctx_handle, vol_type.type_id
) )
if result != 0:
raise OcfError("Volume type unregistration failed", result)
del self.volume_types[vol_type.type_id] del self.volume_types[vol_type.type_id]