Skip to content

Commit c229cda

Browse files
author
David Noble
committed
Addresses Python SDK issue reported by [sathiyamoorthy](http://answers.splunk.com/users/166464/sathiyamoorthy)
See [problem-with-python-splunk-sdk-autologin](http://answers.splunk.com/answers/122881/problem-with-python-splunk-sdk-autologin) Here's the repro: 1. Enter these statements into the Python REPL ``` import splunklib.client as splunkclient splunk_service = splunkclient.connect(host='localhost', port=8089, username='admin', password='changeme', autologin=True) splunk_service.jobs.oneshot("search index=myindex", earliest_time='-1hour') ``` 2. Restart Splunk 3. Enter this statement into the Python REPL ``` splunk_service.jobs.oneshot("search index=myindex", earliest_time='-1hour') ``` **Expected:** Autologin **Observed:** Exception TODO: Test that covers this scenario. Signed-off-by: David Noble <dnoble@splunk.com>
1 parent f13c895 commit c229cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

splunklib/binding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def wrapper(self, *args, **kwargs):
245245
with _handle_auth_error(
246246
"Autologin succeeded, but there was an auth error on "
247247
"next request. Something is very wrong."):
248-
return request_fun()
248+
return request_fun(self, *args, **kwargs)
249249
elif he.status == 401 and not self.autologin:
250250
raise AuthenticationError(
251251
"Request failed: Session is not logged in.", he)

0 commit comments

Comments
 (0)