Skip to content

Commit 4633fb1

Browse files
author
David Noble
committed
Merge branch 'develop-1.2.0' of https://github.com/splunk/splunk-sdk-python into develop-1.2.0
2 parents b22afbf + 9f60f6f commit 4633fb1

File tree

6 files changed

+23
-6
lines changed

6 files changed

+23
-6
lines changed

CHANGELOG.md

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

3+
## Version 1.2
4+
5+
### Bug fix
6+
7+
* When running `setup.py dist` without running `setup.py build`, there is no
8+
longer an `No such file or directory` error on the command line, and the
9+
command behaves as expected.
10+
11+
### Minor changes
12+
13+
* Docstring corrections in modular input examples.
14+
15+
* A minor docstring correction in `splunklib/modularinput/event_writer.py`.
16+
317
## Version 1.1
418

519
### New features and APIs

examples/github_forks/github_forks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def validate_input(self, validation_definition):
110110
def stream_events(self, inputs, ew):
111111
"""This function handles all the action: splunk calls this modular input
112112
without arguments, streams XML describing the inputs to stdin, and waits
113-
for XML on stout describing events.
113+
for XML on stdout describing events.
114114
115115
If you set use_single_instance to True on the scheme in get_scheme, it
116116
will pass all the instances of this input to a single instance of this

examples/random_numbers/random_numbers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def get_scheme(self):
6060
min_argument.required_on_create = True
6161
# If you are not using external validation, you would add something like:
6262
#
63-
# setValidation("min > 0");
63+
# scheme.validation = "min > 0"
6464
scheme.add_argument(min_argument)
6565

6666
max_argument = Argument("max")
@@ -96,7 +96,7 @@ def validate_input(self, validation_definition):
9696
def stream_events(self, inputs, ew):
9797
"""This function handles all the action: splunk calls this modular input
9898
without arguments, streams XML describing the inputs to stdin, and waits
99-
for XML on stout describing events.
99+
for XML on stdout describing events.
100100
101101
If you set use_single_instance to True on the scheme in get_scheme, it
102102
will pass all the instances of this input to a single instance of this

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def run(self):
103103
splunklib_arcname = "splunklib"
104104
modinput_dir = os.path.join(splunklib_arcname, "modularinput")
105105

106+
if not os.path.exists("build"):
107+
os.makedirs("build")
108+
106109
for app in app_names:
107110
with closing(tarfile.open(os.path.join("build", app + ".spl"), "w")) as spl:
108111
spl.add(

splunklib/modularinput/event.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, data=None, stanza=None, time=None, host=None, index=None, sou
6363
self.host = host
6464
self.index = index
6565
self.source = source
66-
self.sourceType = sourcetype
66+
self.sourcetype = sourcetype
6767
self.stanza = stanza
6868
self.time = time
6969
self.unbroken = unbroken
@@ -91,7 +91,7 @@ def write_to(self, stream):
9191
# add all other subelements to this Event, represented by (tag, text)
9292
subelements = [
9393
("source", self.source),
94-
("sourceType", self.sourceType),
94+
("sourcetype", self.sourcetype),
9595
("index", self.index),
9696
("host", self.host),
9797
("data", self.data)

splunklib/modularinput/event_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def log(self, severity, message):
6464
These messages will show up in Splunk's internal logs.
6565
6666
:param severity: ``string``, severity of message, see severites defined as class constants.
67-
:param message: Message to log.
67+
:param message: ``string``, message to log.
6868
"""
6969

7070
self._err.write("%s %s\n" % (severity, message))

0 commit comments

Comments
 (0)