Skip to content

Commit 7a5f896

Browse files
author
David Noble
committed
Release 1.2.2
2 parents 97b9f2f + 70b32a9 commit 7a5f896

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Splunk SDK for Python Changelog
22

3+
## Version 1.2.2
4+
5+
### Bug fixes
6+
7+
1. Addressed a problem with autologin and added test coverage for the use case.
8+
9+
See `ServiceTestCase.test_autologin` in tests/test_service.py.
10+
311
## Version 1.2.1
412

513
### New features and APIs

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The Splunk Software Development Kit for Python
22

3-
#### Version 1.2.1
3+
#### Version 1.2.2
44

55
The Splunk Software Development Kit (SDK) for Python contains library code and
66
examples designed to enable developers to build applications using Splunk.

splunklib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
"""Python library for Splunk."""
1616

17-
__version_info__ = (1, 2, 1)
17+
__version_info__ = (1, 2, 2)
1818
__version__ = ".".join(map(str, __version_info__))
1919

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)

tests/test_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@
2626
from splunklib.client import Service
2727
from splunklib.binding import HTTPError
2828

29+
2930
class ServiceTestCase(testlib.SDKTestCase):
31+
32+
def test_autologin(self):
33+
service = client.connect(autologin=True, **self.opts.kwargs)
34+
self.service.restart(timeout=120)
35+
reader = service.jobs.oneshot("search index=internal | head 1")
36+
self.assertIsNotNone(reader)
37+
3038
def test_capabilities(self):
3139
capabilities = self.service.capabilities
3240
self.assertTrue(isinstance(capabilities, list))

0 commit comments

Comments
 (0)