From a29476ed8255f73de477841b1d37223d4ff8b32a Mon Sep 17 00:00:00 2001 From: Hetang Modi Date: Thu, 10 Nov 2022 18:28:56 +0530 Subject: [PATCH] fix(code): ADDON-58030 parse all definitions of true for splunkd scheme --- .gitignore | 7 ++++++- solnlib/splunkenv.py | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 365d1fd6..df66d9d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,11 @@ +# IDE related files *.idea *.DS_Store* +.venv/ + +# Compiled files __pycache__ *.pyc *.pyo -.coverage \ No newline at end of file + +.coverage diff --git a/solnlib/splunkenv.py b/solnlib/splunkenv.py index 3daceeb3..78ba5822 100644 --- a/solnlib/splunkenv.py +++ b/solnlib/splunkenv.py @@ -24,6 +24,8 @@ from io import StringIO from typing import List, Optional, Tuple, Union +from .utils import is_true + __all__ = [ "make_splunkhome_path", "get_splunk_host_info", @@ -177,7 +179,7 @@ def get_splunkd_access_info() -> Tuple[str, str, int]: Tuple of (scheme, host, port). """ - if get_conf_key_value("server", "sslConfig", "enableSplunkdSSL") == "true": + if is_true(get_conf_key_value("server", "sslConfig", "enableSplunkdSSL")): scheme = "https" else: scheme = "http"