test_env_modify_mobile_www_config.py 文件源码

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

项目:astoptool 作者: zouliuyun 项目源码 文件源码
def __init__(self, filename, remote_dir=REMOTE_DIR):
        self.filename = filename
        self.dir = run('pwd')

        with quiet():
            has_the_file = run('test -f {}'.format(filename)).succeeded

        if not has_the_file:
            raise Exception('File {}/{} NOT exists'.format(self.dir, filename))

        tmp_tag = self.filename.split('/')[0]
        backup_dir = '{}/{}'.format(remote_dir, tmp_tag)
        run('[ -d {0} ] || mkdir -p {0}'.format(backup_dir))
        run('cp {} {}/'.format(self.filename, backup_dir))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号