Change in mom[master]: Fix the lexical priority of operators

agl at us.ibm.com agl at us.ibm.com
Fri Jul 12 18:48:51 UTC 2013


Adam Litke has submitted this change and it was merged.

Change subject: Fix the lexical priority of operators
......................................................................


Fix the lexical priority of operators

As python dictionary has no defined key ordering the
GenericEvaluator.get_operators could return the operators in
bad order. (for example "<" before "<<")

This caused << to be parsed as two < elements and resulted
in parse errors.

This patch fixes it by ordering the returned value by string
size - longer names first.

Change-Id: I7dcb7b110b994b351534ccca4da6dc4b79e20895
Signed-off-by: Martin Sivak <msivak at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/16097
Reviewed-by: Adam Litke <agl at us.ibm.com>
---
M mom/Policy/Parser.py
1 file changed, 9 insertions(+), 2 deletions(-)

Approvals:
  Adam Litke: Looks good to me, approved
  Martin Sivák: Verified


-- 
To view, visit http://gerrit.ovirt.org/16097
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7dcb7b110b994b351534ccca4da6dc4b79e20895
Gerrit-PatchSet: 3
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>



More information about the Engine-commits mailing list