コード例 #1
0
 def _get_configuration(self):
     try:
         username = get_configuration(self.username_conf_name)
         password = get_configuration(self.password_conf_name)
         url = get_configuration(self.url_conf_name)
         return username, password, url
     except KeyError:
         message = "Please set configuration for '{}', '{}', '{} to initialize Kernel.".format(
             self.username_conf_name, self.password_conf_name, self.url_conf_name)
         self._abort_with_fatal_error(message)
コード例 #2
0
    def _abort_with_fatal_error(self, message):
        self._fatal_error = message

        error = get_configuration(Constants.fatal_error_suggestion, self.fatal_error_suggestion).format(message)
        self.logger.error(error)
        self._send_error(error)

        raise ValueError(message)