Skip to content

Commit c7ab101

Browse files
author
Philippe Tang
committed
[DVPL-10898] Cosmetic changes and revert some values
1 parent f8639a3 commit c7ab101

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

splunklib/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ def get(self, path_segment="", owner=None, app=None, sharing=None, **query):
820820
# Search API v2+ fallback to v1:
821821
# - In v2+, /results_preview, /events and /results do not support search params.
822822
# - Fallback from v2+ to v1 if Splunk Version is < 9.
823-
if api_version >= 2 and ('search' in query and path.endswith(tuple(["results_preview", "events", "results"])) or self.service.splunk_version < (9,)):
823+
if api_version >= 2 and ('search' in query and path.endswith(tuple(["results_preview", "events", "results"])) or self.service.splunk_version < (9,)):
824824
path = path.replace(PATH_JOBS_V2, PATH_JOBS)
825825
return self.service.get(path,
826826
owner=owner, app=app, sharing=sharing,
@@ -888,7 +888,7 @@ def post(self, path_segment="", owner=None, app=None, sharing=None, **query):
888888
# Search API v2+ fallback to v1:
889889
# - In v2+, /results_preview, /events and /results do not support search params.
890890
# - Fallback from v2+ to v1 if Splunk Version is < 9.
891-
if api_version >= 2 and ('search' in query and path.endswith(tuple(["results_preview", "events", "results"])) or self.service.splunk_version < (9,)):
891+
if api_version >= 2 and ('search' in query and path.endswith(tuple(["results_preview", "events", "results"])) or self.service.splunk_version < (9,)):
892892
path = path.replace(PATH_JOBS_V2, PATH_JOBS)
893893
return self.service.post(path, owner=owner, app=app, sharing=sharing, **query)
894894

tests/testlib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ def fake_splunk_version(self, version):
165165

166166

167167
def install_app_from_collection(self, name):
168-
collectionName = 'sdk-app-collection'
168+
collectionName = 'sdkappcollection'
169169
if collectionName not in self.service.apps:
170-
raise ValueError("sdk-app-collection not installed in splunkd")
170+
raise ValueError("sdkappcollection not installed in splunkd")
171171
appPath = self.pathInApp(collectionName, ["build", name+".tar"])
172172
kwargs = {"update": True, "name": appPath, "filename": True}
173173

@@ -181,7 +181,7 @@ def install_app_from_collection(self, name):
181181
self.installedApps.append(name)
182182

183183
def app_collection_installed(self):
184-
collectionName = 'sdk-app-collection'
184+
collectionName = 'sdkappcollection'
185185
return collectionName in self.service.apps
186186

187187
def pathInApp(self, appName, pathComponents):

0 commit comments

Comments
 (0)