plugin.py 文件源码

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

项目:sentry-plugins 作者: getsentry 项目源码 文件源码
def validate_config(self, organization, config, actor=None):
        """
if config['foo'] and not config['bar']:
        raise PluginError('You cannot configure foo with bar')
    return config
    ```
    """
    if config.get('name'):
        client = self.get_client(actor)
        try:
            repo = client.get_repo(config['name'])
        except Exception as e:
            self.raise_error(e)
        else:
            config['external_id'] = six.text_type(repo['id'])
    return config

```

评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号