mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 05:45:06 +03:00
Ensure python main function return values (#7860)
The main functions are wrapped by a sys.exit function which expects and argument. The curent implementation isn't returning values in all cases. This change ensures main functions return a value in all cases.
This commit is contained in:
@@ -56,8 +56,9 @@ def main(argv=None):
|
||||
argv = sys.argv[1:]
|
||||
if not argv:
|
||||
usage()
|
||||
sys.exit(1)
|
||||
return 1
|
||||
download_hash(argv)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user