slack_jira/resources.py
def from_config(conf, jira_section=JIRA_SECTION):
        """
        Instantiates a JiraSlack object from a ConfigParser object.

        The ConfigParser must be extracted from a config that looks like the following:
        [jira]
        server = The JIRA server location
        access_token = The OAUTH access token (obtained by doing the OAUTH dance)
        access_token_secret = The OAUTH access token secret (obtained by doing the OAUTH dance)
        consumer_key = The JIRA consumer key as defined in JIRA
        key_cert_path = The path to the private key of the key pair used to configure in JIRA

        Additional documentation can be found in `settings.template.ini`

        :type conf: ConfigParser.ConfigParser
        :param conf: The config object to parse settings from
        :type jira_section: str
        :param jira_section: The section in the config where the jira settings are located

        :rtype: SlackJira
        :return: An instantiated SlackJira from the config parser.

        :raises JiraError: If there was an error instantiated the JIRA object
        :raises ConfigError: If there was an error parsing the config file
            (perhaps a configuration was missing)
        """
        oauth_dict = {
            k: get_config_value(conf, jira_section, k)
            for k in ("access_token", "access_token_secret", "consumer_key")
        }
        # Load the private key certificate
        key_cert_file_path = get_config_value(conf, jira_section, "key_cert_path")
        try:
            with open(key_cert_file_path) as fp:
                oauth_dict["key_cert"] = fp.read()
        except IOError as e:
            raise ConfigError(str(e))

        server_location = get_config_value(conf, jira_section, "server")
        try:
            return SlackJira(jira.JIRA(server=server_location, oauth=oauth_dict))
        except jira.JIRAError as e:
            raise JiraError(e)

        Instantiates a JiraSlack object from a ConfigParser object.

        The ConfigParser must be extracted from a config that looks like the following:
        [jira]
        server = The JIRA server location
        access_token = The OAUTH access token (obtained by doing the OAUTH dance)
        access_token_secret = The OAUTH access token secret (obtained by doing the OAUTH dance)
        consumer_key = The JIRA consumer key as defined in JIRA
        key_cert_path = The path to the private key of the key pair used to configure in JIRA

        Additional documentation can be found in `settings.template.ini`

        :type conf: ConfigParser.ConfigParser
        :param conf: The config object to parse settings from
        :type jira_section: str
        :param jira_section: The section in the config where the jira settings are located

        :rtype: SlackJira
        :return: An instantiated SlackJira from the config parser.

        :raises JiraError: If there was an error instantiated the JIRA object
        :raises ConfigError: If there was an error parsing the config file
            (perhaps a configuration was missing)
        
Instantiates a JiraSlack object from a ConfigParser object.

Additional documentation can be found in `settings.template.ini`
Instantiates a JiraSlack object from a ConfigParser object . Additional documentation can be found in ` settings . template . ini `
def from_config(conf, jira_section=JIRA_SECTION):
        oauth_dict = {
            k: get_config_value(conf, jira_section, k)
            for k in ("access_token", "access_token_secret", "consumer_key")
        }
        key_cert_file_path = get_config_value(conf, jira_section, "key_cert_path")
        try:
            with open(key_cert_file_path) as fp:
                oauth_dict["key_cert"] = fp.read()
        except IOError as e:
            raise ConfigError(str(e))
        server_location = get_config_value(conf, jira_section, "server")
        try:
            return SlackJira(jira.JIRA(server=server_location, oauth=oauth_dict))
        except jira.JIRAError as e:
            raise JiraError(e)
def from_config ( conf , jira_section = JIRA_SECTION ) : oauth_dict = { k : get_config_value ( conf , jira_section , k ) for k in ( "access_token" , "access_token_secret" , "consumer_key" ) } key_cert_file_path = get_config_value ( conf , jira_section , "key_cert_path" ) try : with open ( key_cert_file_path ) as fp : oauth_dict [ "key_cert" ] = fp . read ( ) except IOError as e : raise ConfigError ( str ( e ) ) server_location = get_config_value ( conf , jira_section , "server" ) try : return SlackJira ( jira . JIRA ( server = server_location , oauth = oauth_dict ) ) except jira . JIRAError as e : raise JiraError ( e )
Instantiates a JiraSlack object from a ConfigParser object.
Instantiates a JiraSlack object from a ConfigParser object .
"""
        Instantiates a JiraSlack object from a ConfigParser object.

        The ConfigParser must be extracted from a config that looks like the following:
        [jira]
        server = The JIRA server location
        access_token = The OAUTH access token (obtained by doing the OAUTH dance)
        access_token_secret = The OAUTH access token secret (obtained by doing the OAUTH dance)
        consumer_key = The JIRA consumer key as defined in JIRA
        key_cert_path = The path to the private key of the key pair used to configure in JIRA

        Additional documentation can be found in `settings.template.ini`

        :type conf: ConfigParser.ConfigParser
        :param conf: The config object to parse settings from
        :type jira_section: str
        :param jira_section: The section in the config where the jira settings are located

        :rtype: SlackJira
        :return: An instantiated SlackJira from the config parser.

        :raises JiraError: If there was an error instantiated the JIRA object
        :raises ConfigError: If there was an error parsing the config file
            (perhaps a configuration was missing)
        """ # Load the private key certificate
An instantiated SlackJira from the config parser.
An instantiated SlackJira from the config parser .
SlackJira
If there was an error instantiated the JIRA object
If there was an error instantiated the JIRA object
JiraError
If there was an error parsing the config file
(perhaps a configuration was missing)
If there was an error parsing the config file ( perhaps a configuration was missing )
ConfigError
conf
The config object to parse settings from
The config object to parse settings from
jira_section
The section in the config where the jira settings are located
The section in the config where the jira settings are located