def trigger_restart():
 if sabnzbd.downloader.Downloader.do.paused:
  sabnzbd.RESTART_ARGS.append('-p')
 sys.argv = sabnzbd.RESTART_ARGS
 sabnzbd.halt()
 cherrypy.engine.exit()
 if sabnzbd.WIN32:
  del_connection_info()
 if (sabnzbd.WIN_SERVICE or (getattr(sys, 'frozen', None) == 'macosx_app')):
  sabnzbd.TRIGGER_RESTART = True
 else:
  cherrypy.engine._do_execv()

def trigger_restart ( ) : if sabnzbd . downloader . Downloader . do . paused : sabnzbd . RESTART_ARGS . append ( '-p' ) sys . argv = sabnzbd . RESTART_ARGS sabnzbd . halt ( ) cherrypy . engine . exit ( ) if sabnzbd . WIN32 : del_connection_info ( ) if ( sabnzbd . WIN_SERVICE or ( getattr ( sys , 'frozen' , None ) == 'macosx_app' ) ) : sabnzbd . TRIGGER_RESTART = True else : cherrypy . engine . _do_execv ( )
trigger a restart by setting a flag an shutting down cp .