summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2009-01-04 15:42:43 +0100
committergbrandl <devnull@localhost>2009-01-04 15:42:43 +0100
commit64ef7976772355f0ab4af68c4a572483dcbc15ad (patch)
treeb36b89c204287cccf4539cdc1dc592e49a1d504b /scripts
parent3f16a7589e7d3d9aac7e247e8185197ee0be45b1 (diff)
downloadpygments-64ef7976772355f0ab4af68c4a572483dcbc15ad.tar.gz
Return different exit status when an error is found.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/find_error.py7
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))