コード例 #1
0
    log(msg=_('Entering wait loop'))
    monitor.waitForAbort()

    # Shutdown tasks
    Cache.dispatcher.q_message(
        PubSub_Threaded.Message(PubSub_Threaded.Topic('onShutdown'),
                                pid=os.getpid()))
    log(msg=_('Shutdown started'))
    abortall()
    log(msg='Shutdown complete')


if __name__ == '__main__':

    if testTasks:
        KodiLogger.setLogLevel(KodiLogger.LOGINFO)
        startdebugger()
        from resources.lib.tests.testTasks import testTasks

        tt = testTasks()
        tt.runTests()
    else:
        if branch != 'master':
            try:
                from resources.lib.utils.githubtools import processargs
            except ImportError:
                pass
            else:
                processargs(sys.argv)
        main()
コード例 #2
0
    Cache.dispatcher.q_message(PubSub_Threaded.Message(PubSub_Threaded.Topic('onStartup')))
    monitor = MainMonitor()
    log(msg=_('Entering wait loop'))
    monitor.waitForAbort()

    # Shutdown tasks
    Cache.dispatcher.q_message(PubSub_Threaded.Message(PubSub_Threaded.Topic('onShutdown'), pid=os.getpid()))
    log(msg=_('Shutdown started'))
    abortall()
    log(msg='Shutdown complete')


if __name__ == '__main__':

    if testTasks:
        KodiLogger.setLogLevel(KodiLogger.LOGNOTICE)
        startdebugger()
        from resources.lib.tests.testTasks import testTasks

        tt = testTasks()
        tt.runTests()
    else:
        if branch != 'master':
            try:
                from resources.lib.utils.githubtools import processargs
            except ImportError:
                pass
            else:
                processargs(sys.argv)
        main()