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
评论列表
文章目录