diff options
author | Christian Hammond <chipx86@chipx86.com> | 2009-10-10 03:36:57 -0700 |
---|---|---|
committer | Christian Hammond <chipx86@chipx86.com> | 2009-10-10 03:36:57 -0700 |
commit | 56da9a1a697337d6f4fde4fdeeb6c97c667330de (patch) | |
tree | fb2ad04675e5e3059452e5707ecffde0584fb786 | |
parent | 8388d68190bb6193157788466de8782fd607488e (diff) |
Show syntax errors in .reviewboardrc files.
If a .reviewboardrc file had a syntax error, we would silently ignore it,
which made it hard to debug problems. We now fail on syntax errors and
list the error information, including the filename, line number and offset on
the line.
Patch by Eric Huss
-rwxr-xr-x | rbtools/postreview.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rbtools/postreview.py b/rbtools/postreview.py index 8be963a..9c8b31f 100755 --- a/rbtools/postreview.py +++ b/rbtools/postreview.py @@ -2260,8 +2260,9 @@ def load_config_file(filename): if os.path.exists(filename): try: execfile(filename, config) - except: - pass + except SyntaxError, e: + die('Syntax error in config file: %s\n' + 'Line %i offset %i\n' % (filename, e.lineno, e.offset)) return config |