Move main() into mopidy.core
This commit is contained in:
parent
18eec035b5
commit
9fc7e013ff
@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
if __name__ == '__main__':
|
||||
from mopidy.__main__ import main
|
||||
from mopidy.core import main
|
||||
main()
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user