Esempio n. 1
0
 def _authenticate_connection(self):
     if self.java_parameters.auth_token:
         cmd = "{0}\n{1}\n".format(proto.AUTH_COMMAND_NAME,
                                   self.java_parameters.auth_token)
         answer = self.send_command(cmd)
         error, _ = proto.is_error(answer)
         if error:
             raise Py4JAuthenticationError(
                 "Failed to authenticate with gateway server.")
Esempio n. 2
0
 def _authenticate_connection(self):
     if self.java_parameters.auth_token:
         cmd = "{0}\n{1}\n".format(
             proto.AUTH_COMMAND_NAME,
             self.java_parameters.auth_token
         )
         answer = self.send_command(cmd)
         error, _ = proto.is_error(answer)
         if error:
             raise Py4JAuthenticationError(
                 "Failed to authenticate with gateway server.")