disk: check if device is removable more safely
This commit is contained in:
parent
01ef388113
commit
50a46c6607
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ class DiskPlugin(base.Plugin):
|
|||
|
||||
def _device_is_supported(cls, device):
|
||||
return device.device_type == "disk" \
|
||||
and device.attributes["removable"] == "0" \
|
||||
and device.attributes.get("removable", None) == "0" \
|
||||
and device.parent is not None \
|
||||
and device.parent.subsystem in ["scsi", "virtio"]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue