Skip to content

Commit 540b53e

Browse files
committed
Committing change
1 parent 6ec664a commit 540b53e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎splunklib/client.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ def __getitem__(self, key):
19951995
else:
19961996
raise
19971997
if candidate is None:
1998-
raise KeyError(key) # Never found a match
1998+
raise KeyError(key) # Never found a match. Refer to name matching <http://docs.splunk.com/Documentation/Splunk/6.1.1/RESTAPI/RESTinput#data.2Finputs.2Fmonitor.2F.7Bname.7D>
19991999
else:
20002000
return candidate
20012001

@@ -2070,8 +2070,8 @@ def create(self, name, kind, **kwargs):
20702070
# and we have to adjust accordingly.
20712071
path = _path(
20722072
self.path + kindpath,
2073-
'%s:%s' % (kwargs['restrictToHost'], name) \
2074-
if kwargs.has_key('restrictToHost') else name
2073+
'%s:%s' % urllib.quote((kwargs['restrictToHost'], name), '') \
2074+
if kwargs.has_key('restrictToHost') else urllib.quote(name, '') # Need to change path to URL encoded name
20752075
)
20762076
return Input(self.service, path, kind)
20772077

0 commit comments

Comments
 (0)