aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2013-12-02 13:36:31 +0000
committerlloyd <[email protected]>2013-12-02 13:36:31 +0000
commite5097bfb51e412f0d3d6d1a2131bb8f2095bedb2 (patch)
tree0ae3274d4164d2f09237d9a284dd037991233c6f
parent6c67112a8b43f0724160f425d72b7fb17fe85f8e (diff)
Add a check on API revisions
-rwxr-xr-xconfigure.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index 2bb2f036b..31adeb5e4 100755
--- a/configure.py
+++ b/configure.py
@@ -516,7 +516,10 @@ def lex_me_harder(infofile, to_obj, allowed_groups, name_val_pairs):
# Dirty hack
if token == 'define':
- to_obj.__dict__[token].append(lexer.get_token())
+ nxt = lexer.get_token()
+ if not re.match('[0-9]{8}', nxt):
+ raise LexerError('Bad API rev "%s"' % (nxt), lexer.lineno)
+ to_obj.__dict__[token].append(nxt)
else:
to_obj.__dict__[token] = lexer.get_token()