From 4a09a185746fbdf964e1f7e3f0378e4c72b5b9f4 Mon Sep 17 00:00:00 2001 From: Waldirio M Pinheiro Date: Sun, 17 Oct 2021 06:55:15 -0700 Subject: [PATCH] [FIX] sys.exit added - sys.exit added --- rvtools/rvtools.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rvtools/rvtools.py b/rvtools/rvtools.py index 403fea9..5fef60a 100755 --- a/rvtools/rvtools.py +++ b/rvtools/rvtools.py @@ -1,6 +1,7 @@ #!/usr/bin/env python """ Main rvtools module """ +import sys import os import ssl import argparse @@ -59,7 +60,7 @@ def main(): obj = CoreCode() conn = obj.read_conf_file() if conn is None: - exit() + sys.exit() else: server = conn._vcenter username = conn._username @@ -68,7 +69,7 @@ def main(): if server == '': print("You are using default values. Please update the file") print("~/.rvtools.conf or just pass all mandatory parameters.") - exit() + sys.exit() else: print("Using flags") server = args.host @@ -79,7 +80,7 @@ def main(): if not os.path.isdir(directory): print("You have to create the dir {}".format(directory)) - exit() + sys.exit() ssl_context = ssl._create_unverified_context()