示例#1
0
文件: Restart.py 项目: CBVRT2008/Cos
def restart_os():
    try:
        Kernel.Prepare_For_shutdown()
        time.sleep(1)
        Kernel.startup()

    except AttributeError:
        Kernel.Crash("Second_Restart_Error", True)
示例#2
0
文件: Restart.py 项目: CBVRT2008/Cos
def restart():
    try:
        Kernel.Clear()
        Kernel.Prepare_For_shutdown()
        Boot.Boot()

    except AttributeError:
        Kernel.Crash("Second_Restart_Error", True)
示例#3
0
def CrashHandler(Custom_Errorcode, Enable_Custom_Errorcode):
    if Enable_Custom_Errorcode:
        Kernel.Crash(message, Custom_Errorcode)

    else:
        Kernel.Crash(message, Error_Code)