splunk-sdk-python
splunk-sdk-python copied to clipboard
Issue with splunklib searchcommand validators in python 3
TypeError at "/opt/splunk/etc/apps/splunk_app_infrastructure/bin/external_lib/splunklib/searchcommands/validators.py", line 270 : "delimiter" must be string, not bytes
Python 3.7
If I change delimiter, quotechar and lineterminator to unicode, I don't see errors.
class List(Validator):
""" Validates a list of strings
"""
class Dialect(csv.Dialect):
""" Describes the properties of list option values. """
strict = True
delimiter = b','
quotechar = b'"'
doublequote = True
lineterminator = b'\n'
skipinitialspace = True
quoting = csv.QUOTE_MINIMAL
Fixed and closed: https://github.com/splunk/splunk-sdk-python/commit/79ad17a8ec2576bbd7de70475cbf7b547ffca5b7