Hello Ravi Nori, I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/14544 to review the following change. Change subject: cli: Add brick operation fails from ovirt-shell(#923169) ...................................................................... cli: Add brick operation fails from ovirt-shell(#923169) Duplicate bricks are send when --brick-brick option is specified for add brick operation. Change-Id: Ia42557b26dbaacb0a00da461e07dae60fee4ae5e Bug-Url: https://bugzilla.redhat.com/923169 Signed-off-by: Ravi Nori <rn...@redhat.com> --- M src/ovirtcli/command/command.py 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-cli refs/changes/44/14544/1 diff --git a/src/ovirtcli/command/command.py b/src/ovirtcli/command/command.py index f85a672..4f508a0 100644 --- a/src/ovirtcli/command/command.py +++ b/src/ovirtcli/command/command.py @@ -101,10 +101,9 @@ def __do_set_data(self, obj, prop, fq_prop, val): """INTERNAL: set data in to object based on 'prop' map segmentation""" - if prop.find('-') != -1: - props = prop.split('-') - props_len = len(props) - + props = prop.split('-') + props_len = len(props) + if props_len > 1 or (props_len == 1 and hasattr(obj, prop)): for i in range(props_len): if props[i] == 'type': props[i] = 'type_' if i == (props_len - 1) and hasattr(obj, props[i]) and type(getattr(obj, props[i])) != list: -- To view, visit http://gerrit.ovirt.org/14544 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia42557b26dbaacb0a00da461e07dae60fee4ae5e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-cli Gerrit-Branch: cli_3.2 Gerrit-Owner: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches