diff options
author | lloyd <[email protected]> | 2013-12-02 13:36:31 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-12-02 13:36:31 +0000 |
commit | e5097bfb51e412f0d3d6d1a2131bb8f2095bedb2 (patch) | |
tree | 0ae3274d4164d2f09237d9a284dd037991233c6f | |
parent | 6c67112a8b43f0724160f425d72b7fb17fe85f8e (diff) |
Add a check on API revisions
-rwxr-xr-x | configure.py | 5 |
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() |