From 0f8951e7089013e68e47daa148dccfcca7f692fd Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Sat, 7 Jan 2023 21:27:50 +0100 Subject: [PATCH] LyXHTML validation tests: explicitly exit the Python script if it fails --- development/thorough_export_tests/lyxhtml_validity.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/development/thorough_export_tests/lyxhtml_validity.py b/development/thorough_export_tests/lyxhtml_validity.py index 12c0cbd958..3d50500a8e 100644 --- a/development/thorough_export_tests/lyxhtml_validity.py +++ b/development/thorough_export_tests/lyxhtml_validity.py @@ -23,10 +23,13 @@ import html5validator if len(sys.argv) != 2: print('Expecting one argument, the path to the LyX binary to test') + sys.exit(-1) if not os.path.exists(sys.argv[1]): print('The given path does not point to an existing file') + sys.exit(-1) if not os.access(sys.argv[1], os.X_OK): print('The given path does not point to an executable file') + sys.exit(-1) PATH_SCRIPT = os.path.dirname(os.path.realpath(__file__))