made it possible to select another frontend in config and load this if set; lish will stay default

This commit is contained in:
Johannes Findeisen 2013-11-29 01:15:50 +01:00
commit e5455977d9

View file

@ -35,7 +35,6 @@ from linspector.config.parser import FullConfigParser
from linspector.core.interface import LinspectorInterface from linspector.core.interface import LinspectorInterface
from linspector.core.job import Job from linspector.core.job import Job
from linspector.core.scheduler import Scheduler from linspector.core.scheduler import Scheduler
from linspector.frontends.lish import LishFrontend
from linspector.tasks.task import TaskExecutor from linspector.tasks.task import TaskExecutor
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -168,6 +167,15 @@ def main():
jsonrpc.daemon = True jsonrpc.daemon = True
jsonrpc.start() jsonrpc.start()
frontend = None
if "frontend" in core and core["frontend"]:
frontend = core["frontend"]
if frontend == "clish":
from linspector.frontends.clish import ClishFrontend
ClishFrontend(interface)
else:
from linspector.frontends.lish import LishFrontend
LishFrontend(interface) LishFrontend(interface)
logger.debug("shutting down scheduler") logger.debug("shutting down scheduler")