diff options
author | gbrandl <devnull@localhost> | 2009-01-04 15:42:43 +0100 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2009-01-04 15:42:43 +0100 |
commit | 64ef7976772355f0ab4af68c4a572483dcbc15ad (patch) | |
tree | b36b89c204287cccf4539cdc1dc592e49a1d504b /scripts/find_error.py | |
parent | 3f16a7589e7d3d9aac7e247e8185197ee0be45b1 (diff) | |
download | pygments-64ef7976772355f0ab4af68c4a572483dcbc15ad.tar.gz |
Return different exit status when an error is found.
Diffstat (limited to 'scripts/find_error.py')
-rw-r--r-- | scripts/find_error.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/find_error.py b/scripts/find_error.py index 42a1e095..44dd0539 100644 --- a/scripts/find_error.py +++ b/scripts/find_error.py @@ -42,8 +42,9 @@ def main(fn): print "Error parsing", fn print "\n".join([' ' + repr(x) for x in ntext[-num:]]) print `val` + "<<<" - return + return 1 ntext.append((type,val)) + return 0 num = 10 @@ -52,5 +53,7 @@ if __name__ == "__main__": if sys.argv[1][:2] == '-n': num = int(sys.argv[1][2:]) del sys.argv[1] + ret = 0 for f in sys.argv[1:]: - main(f) + ret += main(f) + sys.exit(bool(ret)) |