Skip to content

Commit

Permalink
error in checking to see if error output is a TextIOBase
Browse files Browse the repository at this point in the history
Also removed a couple unused objects in a test
  • Loading branch information
zenmoto committed Feb 6, 2020
1 parent e307441 commit 68f8737
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion splunklib/modularinput/event_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, output = sys.stdout, error = sys.stderr):
else:
self._out = TextIOWrapper(output)

if isinstance(output, TextIOBase):
if isinstance(error, TextIOBase):
self._err = error
else:
self._err = TextIOWrapper(error)
Expand Down
3 changes: 0 additions & 3 deletions tests/modularinput/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ def test_write_xml_is_sane(self):
out = BytesIO()
err = BytesIO()

outwrap = TextIOWrapper(out)
errwrap = TextIOWrapper(err)

ew = EventWriter(out, err)

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

0 comments on commit 68f8737

Please sign in to comment.