summaryrefslogtreecommitdiffstats
path: root/combox
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-12-13 19:52:41 -0500
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-12-13 19:52:41 -0500
commitdfaf01c692c6252dcbd4edd33ddebb7f74982b57 (patch)
tree5f24a2fd8c57103ffa3edef3d8a67de9c350fb49 /combox
parent1bb94f6ca633f16d95866560799f191507036822 (diff)
combox defaults to using gui for config.
Diffstat (limited to 'combox')
-rw-r--r--combox/cbox.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/combox/cbox.py b/combox/cbox.py
index a9b751c..a8891ac 100644
--- a/combox/cbox.py
+++ b/combox/cbox.py
@@ -31,6 +31,7 @@ from watchdog.observers import Observer
from combox.config import config_cb, get_nodedirs
from combox.events import ComboxDirMonitor, NodeDirMonitor
+from combox.gui import ComboxConfigDialog
from combox.log import log_i, log_e
## Function adapted from Watchdog's docs:
@@ -92,6 +93,9 @@ def main():
parser.add_argument("-t", "--test",
help="Use the combox config file in testing area.",
action="store_true")
+ parser.add_argument("-nw", "--cli",
+ help="Use CLI interface only",
+ action="store_true")
args = parser.parse_args()
if args.test:
CONFIG_DIR = path.join('tests', 'test-config')
@@ -104,7 +108,11 @@ def main():
if not path.exists(CONFIG_DIR):
# combox not configured.
- config_cb(CONFIG_DIR)
+ if not args.cli:
+ ComboxConfigDialog("combox configuration", CONFIG_DIR)
+ else:
+ config_cb(CONFIG_DIR)
+
try:
config = yaml.load(file(config_file, 'r'))
except yaml.YAMLError, exc: