xdrgen: Exit status should be zero on success

To use xdrgen in Makefiles, it needs to exit with a zero status if
the compilation worked. Otherwise the make command fails with an
error.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
Chuck Lever 2024-09-29 20:50:11 -04:00
parent 612196ef5c
commit d86fca3aff

View File

@ -128,5 +128,7 @@ There is NO WARRANTY, to the extent permitted by law.""",
try:
if __name__ == "__main__":
sys.exit(main())
except (SystemExit, KeyboardInterrupt, BrokenPipeError):
except SystemExit:
sys.exit(0)
except (KeyboardInterrupt, BrokenPipeError):
sys.exit(1)