|
@@ -18,7 +18,7 @@ from toolset.utils.output_helper import log
|
|
from ast import literal_eval
|
|
from ast import literal_eval
|
|
|
|
|
|
# Enable cross-platform colored output
|
|
# Enable cross-platform colored output
|
|
-from colorama import init
|
|
|
|
|
|
+from colorama import init, Fore
|
|
init()
|
|
init()
|
|
|
|
|
|
|
|
|
|
@@ -103,7 +103,7 @@ def main(argv=None):
|
|
os.environ['FWROOT'],
|
|
os.environ['FWROOT'],
|
|
args.conf_file)) and not os.path.exists(
|
|
args.conf_file)) and not os.path.exists(
|
|
os.path.join(os.environ['FWROOT'] + 'benchmark.cfg')):
|
|
os.path.join(os.environ['FWROOT'] + 'benchmark.cfg')):
|
|
- log("No config file found. Aborting!", Fore.RED)
|
|
|
|
|
|
+ log("No config file found. Aborting!", color=Fore.RED)
|
|
exit(1)
|
|
exit(1)
|
|
with open(os.path.join(os.environ['FWROOT'], args.conf_file)):
|
|
with open(os.path.join(os.environ['FWROOT'], args.conf_file)):
|
|
config = ConfigParser.SafeConfigParser()
|
|
config = ConfigParser.SafeConfigParser()
|
|
@@ -116,7 +116,7 @@ def main(argv=None):
|
|
except Exception:
|
|
except Exception:
|
|
pass
|
|
pass
|
|
except IOError:
|
|
except IOError:
|
|
- log("Configuration file not found!", Fore.RED)
|
|
|
|
|
|
+ log("Configuration file not found!", color=Fore.RED)
|
|
exit(1)
|
|
exit(1)
|
|
|
|
|
|
##########################################################
|
|
##########################################################
|
|
@@ -126,8 +126,8 @@ def main(argv=None):
|
|
# Verify and massage options
|
|
# Verify and massage options
|
|
if defaults['client_user'] is None or defaults['client_host'] is None:
|
|
if defaults['client_user'] is None or defaults['client_host'] is None:
|
|
log("client_user and client_host are required!", color=Fore.RED)
|
|
log("client_user and client_host are required!", color=Fore.RED)
|
|
- log("Please check your configuration file.")
|
|
|
|
- log("Aborting!")
|
|
|
|
|
|
+ log("Please check your configuration file.", color=Fore.RED)
|
|
|
|
+ log("Aborting!", color=Fore.RED)
|
|
exit(1)
|
|
exit(1)
|
|
|
|
|
|
if defaults['database_user'] is None:
|
|
if defaults['database_user'] is None:
|