cmlpipelines.py 文件源码

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

项目:django-cml 作者: ArtemiusUA 项目源码 文件源码
def handle(self, file_name=None, **options):
        project_name = os.path.basename(os.getcwd())
        dst = file_name is not None and file_name or DEFAULT_FILE_NAME
        if os.path.exists(dst):
            raise CommandError('Error: file "%s" already exists' % dst)
        open(dst, 'w').write(render_to_string('cml/cml-pipelines.txt', {
            'project': project_name,
            'file': os.path.basename(dst).split('.')[0]
        }))
        self.stdout.write('"%s" written.' % os.path.join(dst))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号