base_workspace.py 文件源码

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

项目:ave 作者: sonyxperiadev 项目源码 文件源码
def make_git(self, path):
        if path.startswith('/'):
            path = os.path.normpath(path)
            if not path.startswith(self.path):
                raise Exception('can not create git outside workspace')
        path = os.path.join(self.root, self.uid, path)
        try: # create the target directory
            os.makedirs(path)
        except OSError, e:
            if e.errno != errno.EEXIST:
                raise Exception(
                    'could not create directory at %s: %s' % (path, str(e))
                )
        ave.git.init(path)
        msg = 'Created by avi.workpace.make_git()'
        ave.git.commit(path, msg, allow_empty=True)
        return path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号