Exit with non-zero error code when wrong number of params
This fixes SELinuxNeverallowTestGen.py to exit with a non-zero error
code when it is invoked with the wrong number of parameters. Prior to
this change the tool printed usage and exited with error code 0 which
means the build system would not catch the error situation where the
tool is invoked incorrectly.
Test: ./cts/tools/selinux/SELinuxNeverallowTestGen.py haha && \
echo $?
prints 1
Bug: 37082262
Change-Id: I0e9c4c7edbc36c4437804407ccb074d6d5c3ce14
diff --git a/tools/selinux/SELinuxNeverallowTestGen.py b/tools/selinux/SELinuxNeverallowTestGen.py
index 6194e2d..9b98882 100755
--- a/tools/selinux/SELinuxNeverallowTestGen.py
+++ b/tools/selinux/SELinuxNeverallowTestGen.py
@@ -32,7 +32,7 @@
# check usage
if len(sys.argv) != 3:
print usage
- exit()
+ exit(1)
input_file = sys.argv[1]
output_file = sys.argv[2]