gazee.py 文件源码

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

项目:gazee 作者: hubbcaps 项目源码 文件源码
def restart(self):
        cherrypy.engine.exit()
        if (os.path.exists(os.path.join(gazee.DATA_DIR, 'db.lock'))):
            os.remove(os.path.join(gazee.DATA_DIR, 'db.lock'))
        popen_list = [sys.executable, gazee.FULL_PATH]
        popen_list += gazee.ARGS
        print("Gazee is restarting")
        logging.info('Restarting Gazee with ' + str(popen_list))
        if sys.platform == 'win32':
            subprocess.Popen(popen_list, cwd=os.getcwd())
            os._exit(0)
        else:
            os.execv(sys.executable, popen_list)
        logging.info('Gazee is restarting...')
        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号