setup.py 文件源码

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

项目:ave 作者: sonyxperiadev 项目源码 文件源码
def initial_ave():
    # create /etc/ave/user if it doesn't exist
    import ave.config
    try:
        user = ave.config.create_etc()
    except Exception, e:
        print('ERROR: Installation failed: %s' % e)
        return 1

    # become the run-as user before checking/generating config files
    try:
        import ave.persona
        home = ave.persona.become_user(user)
    except Exception, e:
        print('ERROR: Could not become user %s' % user)
        return 2

    # create the default AVE configuration
    try:
        ave.config.create_default(home)
    except Exception, e:
        print(
            'ERROR: Could not create configuration files for %s: %s'
            % (user, str(e))
        )
        return 3
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号