splunk-sdk-python
splunk-sdk-python copied to clipboard
Confs cannot handle the cases when each stanza is not unique
I tried doing this:
service.confs['web']['settings']['httpport']
But I get a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ngiertz/helmut/helmut/contrib/splunk-sdk-python-2011-09-15.zip/splunk-sdk-python/splunk/client.py", line 288, in __getitem__
File "/Users/ngiertz/helmut/helmut/contrib/splunk-sdk-python-2011-09-15.zip/splunk-sdk-python/splunk/client.py", line 298, in read
File "/Users/ngiertz/helmut/helmut/contrib/splunk-sdk-python-2011-09-15.zip/splunk-sdk-python/splunk/client.py", line 267, in _filter_content
AttributeError: 'list' object has no attribute 'has_key'
The same goes for just calling read on the stanza
The reason for this is that the -/- does not merge stanzas from different namespaces.
This is apparently expected behavior when using the -/- namespace.
The suggestion is to use the nobody/system namespace instead.
I think this got fixed in our develop branch by another change.