Skip to content

Commit 68f8737

Browse files
committed
error in checking to see if error output is a TextIOBase
Also removed a couple unused objects in a test
1 parent e307441 commit 68f8737

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

splunklib/modularinput/event_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(self, output = sys.stdout, error = sys.stderr):
4848
else:
4949
self._out = TextIOWrapper(output)
5050

51-
if isinstance(output, TextIOBase):
51+
if isinstance(error, TextIOBase):
5252
self._err = error
5353
else:
5454
self._err = TextIOWrapper(error)

tests/modularinput/test_event.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ def test_write_xml_is_sane(self):
144144
out = BytesIO()
145145
err = BytesIO()
146146

147-
outwrap = TextIOWrapper(out)
148-
errwrap = TextIOWrapper(err)
149-
150147
ew = EventWriter(out, err)
151148

152149
expected_xml = ET.parse(data_open("data/event_maximal.xml")).getroot()

0 commit comments

Comments
 (0)