Juan Hernandez has posted comments on this change. Change subject: codegen, sdk: Use relative paths ......................................................................
Patch Set 2: (1 comment) http://gerrit.ovirt.org/#/c/23368/2/src/codegen/rsdl/rsdlcodegen.py File src/codegen/rsdl/rsdlcodegen.py: Line 85: Line 86: # Get all the links from the RSDL document an make them relative: Line 87: links = proxy.request('GET', '?rsdl').links.link Line 88: for link in links: Line 89: link.href = link.href.replace(prefix, "") > > The "pop" mechanism can't be used, because the prefix can contain more th What I did is this: link.href = link.href.replace(prefix, "", 1) This replaces only the first occurrence of the prefix (note the last parameter the replace method). This is safe because currently all the links in the RSDL document start with the same prefix. Line 90: Line 91: for link in links: Line 92: Line 93: response_type = None -- To view, visit http://gerrit.ovirt.org/23368 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e39510541e34349fce5a8ad4a643cf65784bccc Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <[email protected]> Gerrit-Reviewer: Juan Hernandez <[email protected]> Gerrit-Reviewer: Michael Pasternak <[email protected]> Gerrit-Reviewer: Yedidyah Bar David <[email protected]> Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
