Yeela Kaplan has uploaded a new change for review. Change subject: Take care of 'No devices found' when calling dmsetup status ......................................................................
Take care of 'No devices found' when calling dmsetup status When there are no devices dmsetup status will return only: 'No devices found' Change-Id: Ibb487feab43741267e4f7027c1baf033148683c1 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=881947 Signed-off-by: Yeela Kaplan <[email protected]> --- M vdsm/storage/devicemapper.py 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/10035/1 diff --git a/vdsm/storage/devicemapper.py b/vdsm/storage/devicemapper.py index a1651e0..9263a4b 100644 --- a/vdsm/storage/devicemapper.py +++ b/vdsm/storage/devicemapper.py @@ -176,7 +176,14 @@ res = {} for statusLine in out: - devName, statusLine = statusLine.split(":", 1) + try: + devName, statusLine = statusLine.split(":", 1) + except ValueError: + if len(out) == 1: + return res + else: + raise + for m in PATH_STATUS_RE.finditer(statusLine): devNum, status = m.groups() physdevName = findDev(*[int(i) for i in devNum.split(":")]) -- To view, visit http://gerrit.ovirt.org/10035 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb487feab43741267e4f7027c1baf033148683c1 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
