parameters: (self)
docstring: Create local or remote client depending on the master availability.
  
          Return:
              A local client if this factory was used to create a master.
              Otherwise, return a thrift client connected to a remote master.  In
              the latter case, hostname and port must have been provided in the
              factory constructor.
docstring_summary: Create local or remote client depending on the master availability.
docstring_tokens: Create local or remote client depending on the master availability .
function: def get_client(self):
          """Create local or remote client depending on the master availability.
  
          Return:
              A local client if this factory was used to create a master.
              Otherwise, return a thrift client connected to a remote master.  In
              the latter case, hostname and port must have been provided in the
              factory constructor.
          """
          if self._master_handler:
              return LocalClient(self._master_handler)
          else:
              if not self._hostname or not self._port:
                  raise Exception('hostname and port must be defined')
              return RemoteClient(self._hostname, self._port)
function_tokens: def get_client ( self ) : if self . _master_handler : return LocalClient ( self . _master_handler ) else : if not self . _hostname or not self . _port : raise Exception ( 'hostname and port must be defined' ) return RemoteClient ( self . _hostname , self . _port )