test_env_modify_mobile_www_config.py 文件源码

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

项目:astoptool 作者: zouliuyun 项目源码 文件源码
def modify_mobile_www_config(game, region, scopes, filename, option_name, option_value):

    conf = ConfigReader(game, region)
    ip = conf.get("mobile_www_ip")

    if conf.has_option("mobile_www_port"):
        """
        ????????????ssh?????????Fabric?????host???
        """
        port = conf.getint("mobile_www_port")     
        if port:
            ip = '{}:{}'.format(ip, port)

    root_dir = conf.get("mobile_www_root_test")

    @hosts(ip)
    def _modify_mobile_www_config():
        for each_scope in scopes:
            with cd(root_dir):
                _filename = '{}/{}'.format(each_scope, filename)
                config_file = MConfig(_filename)
                config_file.modify(key=option_name, value=option_value)

    execute(_modify_mobile_www_config)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号