Skip to content

Commit 6692ef7

Browse files
author
David Noble
committed
Merge branch 'develop' of https://github.com/splunk/splunk-sdk-python into develop
2 parents 0e2e0ef + f19b4a0 commit 6692ef7

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ splunk_sdk.egg-info/
2525
dist/
2626
examples/searchcommands_app/package/default/commands.conf
2727
examples/searchcommands_app/package/bin/packages
28+
tests/searchcommands/apps/app_with_logging_configuration/*.log
29+
*.observed

CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### New features and APIs
66

7-
* Added support for the new experimental Search Command Protocol V2, for Splunk 6.3+.
7+
* Added support for the new experimental Search Command Protocol v2, for Splunk 6.3+.
88

99
Opt-in by setting `chunked = true` in commands.conf. See `examples/searchcommands_app/package/default/commands-scpv2.conf`.
1010

@@ -27,9 +27,13 @@
2727

2828
### Bug fixes
2929

30-
* GitHub issue 88: `splunklib.searchcommands.splunk_csv.dict_reader` raises `KeyError` when `supports_multivalues = True`.
30+
* GitHub issue 88: `splunklib.modularinput`, `<done/>` written even when `done=False`.
3131

32-
* Various other bug fixes/improvements for Search Command Protocol V1.
32+
* GitHub issue 115: `splunklib.searchcommands.splunk_csv.dict_reader` raises `KeyError` when `supports_multivalues = True`.
33+
34+
* GitHub issue 119: `None` returned in `_load_atom_entries`.
35+
36+
* Various other bug fixes/improvements for Search Command Protocol v1.
3337

3438
* Various bug fixes/improvements to the full splunklib test suite.
3539

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def run_test_suite():
3737
unittest.TextTestRunner().run(suite)
3838
os.chdir(original_cwd)
3939

40+
4041
def run_test_suite_with_junit_output():
4142
try:
4243
import unittest2 as unittest
@@ -49,6 +50,7 @@ def run_test_suite_with_junit_output():
4950
xmlrunner.XMLTestRunner(output='../test-reports').run(suite)
5051
os.chdir(original_cwd)
5152

53+
5254
class CoverageCommand(Command):
5355
"""setup.py command to run code coverage of the test suite."""
5456
description = "Create an HTML coverage report from running the full test suite."
@@ -87,6 +89,7 @@ def finalize_options(self):
8789
def run(self):
8890
run_test_suite()
8991

92+
9093
class JunitXmlTestCommand(Command):
9194
"""setup.py command to run the whole test suite."""
9295
description = "Run test full test suite with JUnit-formatted output."
@@ -170,7 +173,7 @@ def run(self):
170173

171174
setup_py = os.path.join('examples', 'searchcommands_app', 'setup.py')
172175

173-
check_call((setup_py, 'build', '--force'), stderr=STDOUT, stdout=sys.stdout)
176+
check_call(('python', setup_py, 'build', '--force'), stderr=STDOUT, stdout=sys.stdout)
174177
tarball = 'searchcommands_app-{0}-private.tar.gz'.format(self.distribution.metadata.version)
175178
source = os.path.join('examples', 'searchcommands_app', 'build', tarball)
176179
target = os.path.join('build', tarball)

splunklib/binding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ def request(url, message, **kwargs):
13241324
head = {
13251325
"Content-Length": str(len(body)),
13261326
"Host": host,
1327-
"User-Agent": "splunk-sdk-python/1.4",
1327+
"User-Agent": "splunk-sdk-python/1.5.0",
13281328
"Accept": "*/*",
13291329
} # defaults
13301330
for key, value in message["headers"]:

splunklib/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def _load_atom_entries(response):
201201
r = _load_atom(response)
202202
if 'feed' in r:
203203
# Need this to handle a random case in the REST API
204-
if r.feed.get('totalResults') == 0:
204+
if r.feed.get('totalResults') in [0, '0']:
205205
return []
206206
entries = r.feed.get('entry', None)
207207
if entries is None: return None

splunklib/modularinput/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def run_script(self, args, event_writer, input_stream):
103103
event_writer._err.write(err_string)
104104

105105
except Exception as e:
106-
err_string = EventWriter.ERROR + e.message
106+
err_string = EventWriter.ERROR + str(e.message)
107107
event_writer._err.write(err_string)
108108
return 1
109109

0 commit comments

Comments
 (0)