From 0dea22285e3752100c3f76274bafabe59745031d Mon Sep 17 00:00:00 2001 From: Dunedan Date: Sun, 25 Aug 2024 17:08:00 +0200 Subject: [PATCH] Fix the exit codes of checkrefs.py --- source/tools/entity/checkrefs.py | 2 +- source/tools/xmlvalidator/validate_grammar.py | 2 +- source/tools/xmlvalidator/validator.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/tools/entity/checkrefs.py b/source/tools/entity/checkrefs.py index 45d42fdd22..4c2803892a 100755 --- a/source/tools/entity/checkrefs.py +++ b/source/tools/entity/checkrefs.py @@ -145,7 +145,7 @@ class CheckRefs: if not validator.run(): self.inError = True - return self.inError + return not self.inError def get_mod_dependencies(self, *mods): modjsondeps = [] diff --git a/source/tools/xmlvalidator/validate_grammar.py b/source/tools/xmlvalidator/validate_grammar.py index a692237687..6a18136047 100755 --- a/source/tools/xmlvalidator/validate_grammar.py +++ b/source/tools/xmlvalidator/validate_grammar.py @@ -63,7 +63,7 @@ class RelaxNGValidator: self.validate_soundgroups() self.validate_terrains() self.validate_textures() - return self.inError + return not self.inError def main(self): """Program entry point, parses command line arguments and launches the validation""" diff --git a/source/tools/xmlvalidator/validator.py b/source/tools/xmlvalidator/validator.py index 9a59a637b7..8775e96d32 100755 --- a/source/tools/xmlvalidator/validator.py +++ b/source/tools/xmlvalidator/validator.py @@ -220,7 +220,7 @@ class Validator: ) self.inError = True - return self.inError + return not self.inError if __name__ == "__main__":