Skip to content

Commit

Permalink
extract-ofp-errors: Remove support for hexadecimal error types.
Browse files Browse the repository at this point in the history
This feature wasn't used and removing it slightly simplifies the code.

Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed Jun 12, 2013
1 parent 9583bc1 commit 609e778
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions build-aux/extract-ofp-errors
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 609e778

Please sign in to comment.