slack_jira/resources.py
def from_config(conf, section="slackbot"):
        """
        Loads the slack options from a ConfigParser object.

        :param conf: ConfigParser object with slackbot settings
        :type conf: ConfigParser.ConfigParser
        :param section: The section to extract settings from.  Defaults to "slackbot"
        :type section: str

        :rtype: SlackBotConfig
        :return: A loaded SlackBotConfig object with the options parsed from the configparser.

        :raises: ConfigError: When the config did not contain the specified section
            or required options.
        """
        get_conf = functools.partial(get_config_value, conf, section)

        conf_slackbot_plugins = get_conf("slackbot_plugins")
        plugins = [p.strip() for p in conf_slackbot_plugins.split(",")]

        return SlackBotConfig(
            api_token=get_conf("api_token"),
            slackbot_plugins=plugins,
            bot_emoji=get_conf("bot_emoji", required=False),
            bot_icon=get_conf("bot_icon", required=False),
            errors_to=get_conf("errors_to", required=False),
        )

        Loads the slack options from a ConfigParser object.

        :param conf: ConfigParser object with slackbot settings
        :type conf: ConfigParser.ConfigParser
        :param section: The section to extract settings from.  Defaults to "slackbot"
        :type section: str

        :rtype: SlackBotConfig
        :return: A loaded SlackBotConfig object with the options parsed from the configparser.

        :raises: ConfigError: When the config did not contain the specified section
            or required options.
        
Loads the slack options from a ConfigParser object.
Loads the slack options from a ConfigParser object .
def from_config(conf, section="slackbot"):
        get_conf = functools.partial(get_config_value, conf, section)
        conf_slackbot_plugins = get_conf("slackbot_plugins")
        plugins = [p.strip() for p in conf_slackbot_plugins.split(",")]
        return SlackBotConfig(
            api_token=get_conf("api_token"),
            slackbot_plugins=plugins,
            bot_emoji=get_conf("bot_emoji", required=False),
            bot_icon=get_conf("bot_icon", required=False),
            errors_to=get_conf("errors_to", required=False),
        )
def from_config ( conf , section = "slackbot" ) : get_conf = functools . partial ( get_config_value , conf , section ) conf_slackbot_plugins = get_conf ( "slackbot_plugins" ) plugins = [ p . strip ( ) for p in conf_slackbot_plugins . split ( "," ) ] return SlackBotConfig ( api_token = get_conf ( "api_token" ) , slackbot_plugins = plugins , bot_emoji = get_conf ( "bot_emoji" , required = False ) , bot_icon = get_conf ( "bot_icon" , required = False ) , errors_to = get_conf ( "errors_to" , required = False ) , )
Loads the slack options from a ConfigParser object.
Loads the slack options from a ConfigParser object .
"""
        Loads the slack options from a ConfigParser object.

        :param conf: ConfigParser object with slackbot settings
        :type conf: ConfigParser.ConfigParser
        :param section: The section to extract settings from.  Defaults to "slackbot"
        :type section: str

        :rtype: SlackBotConfig
        :return: A loaded SlackBotConfig object with the options parsed from the configparser.

        :raises: ConfigError: When the config did not contain the specified section
            or required options.
        """
A loaded SlackBotConfig object with the options parsed from the configparser.
A loaded SlackBotConfig object with the options parsed from the configparser .
SlackBotConfig
When the config did not contain the specified section
or required options.
When the config did not contain the specified section or required options .
conf
ConfigParser object with slackbot settings
ConfigParser object with slackbot settings
section
The section to extract settings from.  Defaults to "slackbot"
The section to extract settings from . Defaults to " slackbot "