initialize.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:tor_core 作者: GrafeasGroup 项目源码 文件源码
def configure_tor(config):
    """
    Assembles the tor object based on whether or not we've enabled debug mode
    and returns it. There's really no reason to put together a Subreddit
    object dedicated to our subreddit -- it just makes some future lines
    a little easier to type.

    :param r: the active Reddit object.
    :param config: the global config object.
    :return: the Subreddit object for the chosen subreddit.
    """
    if config.debug_mode:
        tor = config.r.subreddit('ModsOfToR')
    else:
        # normal operation, our primary subreddit
        tor = config.r.subreddit('transcribersofreddit')

    return tor
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号