Skip to content

Commit 9ef9225

Browse files
authored
Merge pull request #494 from artemrys/use-splunk-version
Reuse splunklib.__version__ in handler.request
2 parents 6373bcf + 0ee4685 commit 9ef9225

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

splunklib/binding.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
from io import BytesIO
4040
from xml.etree.ElementTree import XML
4141

42+
from splunklib import __version__
4243
from splunklib import six
4344
from splunklib.six.moves import urllib
4445

@@ -1434,7 +1435,7 @@ def request(url, message, **kwargs):
14341435
head = {
14351436
"Content-Length": str(len(body)),
14361437
"Host": host,
1437-
"User-Agent": "splunk-sdk-python/1.7.2",
1438+
"User-Agent": "splunk-sdk-python/%s" % __version__,
14381439
"Accept": "*/*",
14391440
"Connection": "Close",
14401441
} # defaults

0 commit comments

Comments
 (0)