Skip to content

Commit 3c80f84

Browse files
committed
Fix Job.preview() to not reinterpret HTTP 204, to be consistent with Job.results(). (This was intended in a previous change by Fred.)
1 parent 9b9d964 commit 3c80f84

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

splunklib/client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2550,11 +2550,7 @@ def preview(self, **query_params):
25502550
25512551
:return: The ``InputStream`` IO handle to this job's preview results.
25522552
"""
2553-
response = self.get("results_preview", **query_params)
2554-
if response.status == 204:
2555-
raise ValueError("No events yet. Try again later.")
2556-
else:
2557-
return response.body
2553+
return self.get("results_preview", **query_params).body
25582554

25592555
def searchlog(self, **kwargs):
25602556
"""Returns a streaming handle to this job's search log.

0 commit comments

Comments
 (0)