Move main() into mopidy.core

This commit is contained in:
Stein Magnus Jodal 2011-03-07 20:11:34 +01:00
parent 18eec035b5
commit 9fc7e013ff
3 changed files with 9 additions and 11 deletions

View File

@ -1,5 +1,5 @@
#! /usr/bin/env python
if __name__ == '__main__':
from mopidy.__main__ import main
from mopidy.core import main
main()

View File

@ -1,17 +1,10 @@
import os
import sys
# Add ../ to the path so we can run Mopidy from a Git checkout without
# installing it on the system.
import os
import sys
sys.path.insert(0,
os.path.abspath(os.path.join(os.path.dirname(__file__), '../')))
from mopidy.core import CoreProcess
def main():
# Explictly call run() instead of start(), since we don't need to start
# another process.
CoreProcess().run()
if __name__ == '__main__':
from mopidy.core import main
main()

View File

@ -12,6 +12,11 @@ from mopidy.utils.settings import list_settings_optparse_callback
logger = logging.getLogger('mopidy.core')
def main():
# Explictly call run() instead of start(), since we don't need to start
# another process.
CoreProcess().run()
class CoreProcess(BaseThread):
def __init__(self):
self.core_queue = multiprocessing.Queue()