Permalink
Browse files

Added headless support. No gui option now works.

  • Loading branch information...
1 parent f660aaf commit 369f4525c4a914d4118924efb3048937882d75d9 @4ZM committed Sep 17, 2011
Showing with 9 additions and 5 deletions.
  1. +9 −5 dandelionpy/dandelion/app.py
@@ -22,7 +22,7 @@
from dandelion.synchronizer import Synchronizer
from dandelion.discoverer import Discoverer
from dandelion.ui import UI
-from dandelion.gui.gui import GUI
+#from dandelion.gui.gui import GUI
import sys
class DandelionApp:
@@ -52,7 +52,7 @@ def run_ui(self):
self._ui.run()
def run_gui(self):
-
+ from dandelion.gui.gui import GUI
self._gui = GUI(self._config_manager.ui_config,
self._config_manager.content_db,
self._config_manager.identity,
@@ -67,9 +67,13 @@ def exit(self):
def run():
app = DandelionApp('dandelion.conf')
- app._server.start()
- app._discoverer.start()
- app._synchronizer.start()
+
+ if "--no-server" not in sys.argv:
+ app._server.start()
+
+ if "--no-discovery" not in sys.argv:
+ app._discoverer.start()
+ app._synchronizer.start()
if "--no-gui" in sys.argv:
app.run_ui()

0 comments on commit 369f452

Please sign in to comment.