Skip to content
Snippets Groups Projects
Unverified Commit c7d12cdd authored by Victor Morales's avatar Victor Morales Committed by GitHub
Browse files

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.
parent 1f092297
No related branches found
No related tags found
No related merge requests found
......@@ -430,6 +430,7 @@ def main(argv=None):
if not argv:
argv = sys.argv[1:]
KubesprayInventory(argv, CONFIG_FILE)
return 0
if __name__ == "__main__":
......
......@@ -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__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment