Juan Hernandez has uploaded a new change for review. Change subject: codegen: Allow = in replaced function parameters ......................................................................
codegen: Allow = in replaced function parameters The code generator replaces some of the functions in the params.py file generated by generateDS.py. To locate these functions it uses regular expressions, but it doesn't take into account that parameters can contain the equals sign. In version 2.9a of generateDS.py the generated functions didn't have parameters with default values, so the equals sign wasn't present: def parseString(inString) In version 2.12a of generateDS.py the generated functions have parameters with default values: def parseString(inString, silence=False) This patch changes the code generator so that it will locate the functions correctly in both cases, with or without the equals sign. Change-Id: I7eccef883def440e04e47a7e04c476a3d3348a91 Related: https://bugzilla.redhat.com/1091688 Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com> --- M src/codegen/xsd/genparams.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk refs/changes/21/27221/1 diff --git a/src/codegen/xsd/genparams.py b/src/codegen/xsd/genparams.py index f0b47cd..94db8b1 100755 --- a/src/codegen/xsd/genparams.py +++ b/src/codegen/xsd/genparams.py @@ -218,7 +218,7 @@ @classmethod def getGlobalFun(cls, attri, symbols=[]): - attrrule = r'^def\s+%s\s*\([_\w\s\*,]*\)\s*:.*$' % attri + attrrule = r'^def\s+%s\s*\([_\w\s\*=,]*\)\s*:.*$' % attri p = re.compile(attrrule, re.M) for val in symbols: m = p.match(val) -- To view, visit http://gerrit.ovirt.org/27221 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7eccef883def440e04e47a7e04c476a3d3348a91 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches