[ovs-dev] [ext-260 v3 3/5] extract-ofp-errors: Remove support for hexadecimal error types.

Reid Price rprice at nicira.com
Wed Jun 12 20:21:30 UTC 2013


Looks good to me, tested.


On Wed, Jun 12, 2013 at 11:35 AM, Ben Pfaff <blp at nicira.com> wrote:

> This feature wasn't used and removing it slightly simplifies the code.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
>  build-aux/extract-ofp-errors |   10 +++-------
>  1 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
> index 965e322..32d0913 100755
> --- a/build-aux/extract-ofp-errors
> +++ b/build-aux/extract-ofp-errors
> @@ -212,17 +212,13 @@ def extract_ofp_errors(filenames):
>              names.append(enum)
>
>              for dst in dsts.split(', '):
> -                m =
> re.match(r'([A-Z0-9.+]+)\((\d+|(0x)[0-9a-fA-F]+)(?:,(\d+))?\)$', dst)
> +                m = re.match(r'([A-Z0-9.+]+)\((\d+)(?:,(\d+))?\)$', dst)
>                  if not m:
>                      fatal("%s: syntax error in destination" % dst)
>                  targets = m.group(1)
> +                type_ = int(m.group(2))
>                  if m.group(3):
> -                    base = 16
> -                else:
> -                    base = 10
> -                type_ = int(m.group(2), base)
> -                if m.group(4):
> -                    code = int(m.group(4))
> +                    code = int(m.group(3))
>                  else:
>                      code = None
>
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130612/8c700dc1/attachment-0003.html>


More information about the dev mailing list