Skip to content

Commit

Permalink
fix(server_info): handle splunk not present imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hetangmodi-crest committed Jul 2, 2024
1 parent e204a3d commit 89cb2b0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion solnlib/server_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@
import json
from typing import Any, Dict, Optional

from splunk.rest import getWebCertFile, getWebKeyFile
try:
from splunk.rest import getWebCertFile, getWebKeyFile
except (ModuleNotFoundError, ImportError):

def getWebCertFile():
return None

def getWebKeyFile():
return None


from splunklib import binding
from solnlib import splunk_rest_client as rest_client
from solnlib import utils
Expand Down

0 comments on commit 89cb2b0

Please sign in to comment.