contrib/check-code.py
changeset 11816 e1359ad582f6
parent 11764 16723af520b0
child 11886 73112cb2a6d7
--- a/contrib/check-code.py	Thu Aug 12 09:40:48 2010 +0100
+++ b/contrib/check-code.py	Thu Aug 12 16:42:41 2010 +0800
@@ -7,7 +7,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-import re, glob, os
+import re, glob, os, sys
 import optparse
 
 def repquote(m):
@@ -261,5 +261,8 @@
         check = args
 
     for f in check:
-        checkfile(f, maxerr=options.per_file, warnings=options.warnings,
-                  blame=options.blame)
+        ret = 0
+        if not checkfile(f, maxerr=options.per_file, warnings=options.warnings,
+                         blame=options.blame):
+            ret = 1
+    sys.exit(ret)