extract-ofp-errors: Remove support for hexadecimal error types.
authorBen Pfaff <blp@nicira.com>
Wed, 13 Feb 2013 00:24:53 +0000 (16:24 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 12 Jun 2013 20:32:21 +0000 (13:32 -0700)
This feature wasn't used and removing it slightly simplifies the code.

Signed-off-by: Ben Pfaff <blp@nicira.com>
build-aux/extract-ofp-errors

index 965e322..32d0913 100755 (executable)
@@ -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