Francesco Romani has posted comments on this change. Change subject: rpc: Make Bridge#_type_fixup more robust ......................................................................
Patch Set 1: (2 comments) seems OK, but I'd like more data about the failure. https://gerrit.ovirt.org/#/c/56811/1//COMMIT_MSG Commit Message: Line 6: Line 7: rpc: Make Bridge#_type_fixup more robust Line 8: Line 9: _type_fixup method assumed that all top-level arguments of rpc calls are Line 10: dictionaries thus failing with arguments of type e.g. 'int'. please add which verb(s) triggered the failure Line 11: Line 12: This patch fixes this issues and only recurses deeper if the 'item' Line 13: itself is a dictionary. Line 14: https://gerrit.ovirt.org/#/c/56811/1/lib/vdsm/rpc/Bridge.py File lib/vdsm/rpc/Bridge.py: Line 205: typefixups[symTypeName](item) Line 206: for (k, v) in symbol.get('data', {}).items(): Line 207: k = self._sym_name_filter(k) Line 208: # first check if the 'item' supports indexing Line 209: if isinstance(item, collections.Iterable) and k in item: > in case 'item' is an 'int' this fails with I'd expect the above `for' to fail. Could you please add a testcase to exercise the fix? Line 210: self._type_fixup(k, v, item[k]) Line 211: Line 212: def _fixup_args(self, className, methodName, args): Line 213: argDef = self.api['commands'][className][methodName].get('data', {}) -- To view, visit https://gerrit.ovirt.org/56811 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5871f6c08fe384f52bfa190a44290e2489f06981 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches