From 2f5c6f7b8b177524d37bfe4c9c6d270e536f85ad Mon Sep 17 00:00:00 2001 From: Simon Budig Date: Wed, 8 Nov 2006 22:47:44 +0000 Subject: [PATCH] don't bail out successfully after the first test, don't bail out 2006-11-08 Simon Budig * tools/defcheck.py: don't bail out successfully after the first test, don't bail out prematurely on a failed test and actually spot double symbols in .def-files if they follow immediately each other... --- ChangeLog | 6 ++++++ tools/defcheck.py | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 416770df87..950a91d308 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-11-08 Simon Budig + + * tools/defcheck.py: don't bail out successfully after the first test, + don't bail out prematurely on a failed test and actually spot double + symbols in .def-files if they follow immediately each other... + 2006-11-08 Sven Neumann * tools/Makefile.am (EXTRA_DIST): added defcheck.py. diff --git a/tools/defcheck.py b/tools/defcheck.py index 2344f6d750..d7ada67483 100755 --- a/tools/defcheck.py +++ b/tools/defcheck.py @@ -41,6 +41,8 @@ def_files = ( "libgimpwidgets/gimpwidgets.def" ) +have_errors = 0 + for df in def_files: directory, rest = df.split ("/") basename, extension = rest.split (".") @@ -55,7 +57,7 @@ for df in def_files: doublesymbols = [] for i in range (len (defsymbols)-1, 0, -1): - if defsymbols[i] in defsymbols[:i-1]: + if defsymbols[i] in defsymbols[:i]: doublesymbols.append ((defsymbols[i], i+2)) unsortindex = -1 @@ -104,6 +106,6 @@ for df in def_files: print " the .def-file is not properly sorted (line %d)" % (unsortindex + 2) print - sys.exit (1) + have_errors = -1 - sys.exit (0) +sys.exit (have_errors)