@@ -74,14 +74,14 @@ class AuthenticationError(Exception):
7474 pass
7575
7676# Singleton values to eschew None
77- class NoAuthenticationToken (object ):
77+ class _NoAuthenticationToken (object ):
7878 """The value stored in a :class:`Context` or :class:`splunklib.client.Service`
7979 class that is not logged in.
8080
8181 If a ``Context`` or ``Service`` object is created without an authentication
8282 token, and there has not yet been a call to the ``login`` method, the token
8383 field of the ``Context`` or ``Service`` object is set to
84- ``NoAuthenticationToken ``.
84+ ``_NoAuthenticationToken ``.
8585
8686 Likewise, after a ``Context`` or ``Service`` object has been logged out, the
8787 token is set to this value again.
@@ -227,7 +227,7 @@ def f():
227227 """
228228 @wraps (request_fun )
229229 def wrapper (self , * args , ** kwargs ):
230- if self .token is NoAuthenticationToken :
230+ if self .token is _NoAuthenticationToken :
231231 # Not yet logged in.
232232 if self .autologin and self .username and self .password :
233233 # This will throw an uncaught
@@ -403,9 +403,9 @@ class Context(object):
403403 """
404404 def __init__ (self , handler = None , ** kwargs ):
405405 self .http = HttpLib (handler )
406- self .token = kwargs .get ("token" , NoAuthenticationToken )
406+ self .token = kwargs .get ("token" , _NoAuthenticationToken )
407407 if self .token is None : # In case someone explicitly passes token=None
408- self .token = NoAuthenticationToken
408+ self .token = _NoAuthenticationToken
409409 self .scheme = kwargs .get ("scheme" , DEFAULT_SCHEME )
410410 self .host = kwargs .get ("host" , DEFAULT_HOST )
411411 self .port = int (kwargs .get ("port" , DEFAULT_PORT ))
@@ -742,7 +742,7 @@ def login(self):
742742 c = binding.Context(...).login()
743743 # Then issue requests...
744744 """
745- if self .token is not NoAuthenticationToken and \
745+ if self .token is not _NoAuthenticationToken and \
746746 (not self .username and not self .password ):
747747 # If we were passed a session token, but no username or
748748 # password, then login is a nop, since we're automatically
@@ -765,7 +765,7 @@ def login(self):
765765
766766 def logout (self ):
767767 """Forgets the current session token."""
768- self .token = NoAuthenticationToken
768+ self .token = _NoAuthenticationToken
769769 return self
770770
771771 def _abspath (self , path_segment ,
0 commit comments