From a380093afc0112e0cc97921aeab31ee989348041 Mon Sep 17 00:00:00 2001 From: einarr Date: Thu, 7 Feb 2008 14:20:52 +0000 Subject: [PATCH] Added workflowdir to configuration file. workflowdir is a semicolon separated path of directories where workflows can be found. --- bin/fluents | 7 +++++-- fluents/workflow.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/fluents b/bin/fluents index 98a4b67..7bda116 100755 --- a/bin/fluents +++ b/bin/fluents @@ -31,6 +31,8 @@ def parse_options(): cp.add_option('datadir', type='string', default=os.environ['HOME']) + cp.add_option('workflowdir', type='string', + default='workflows') cp.parse() op = optparse.OptionParser() @@ -53,15 +55,16 @@ if __name__ == '__main__': import gtk import gnome - foo = gnome.program_init(PROGRAM_NAME, VERSION) - print foo + gnome.program_init(PROGRAM_NAME, VERSION) options, params = parse_options() + main.options = options if options.list_workflows: list_workflows() sys.exit(0) + print "options.workflow:", options.workflow selected_wf = workflow.find_workflow(options.workflow) print selected_wf if selected_wf == None: selected_wf = workflow.EmptyWorkflow diff --git a/fluents/workflow.py b/fluents/workflow.py index 07c9e95..bb42cbc 100644 --- a/fluents/workflow.py +++ b/fluents/workflow.py @@ -51,7 +51,7 @@ def find_workflow(basename): print "find_workflow" # List all .py files that can contain workflow classes - wf_path = sys.path + wf_path = main.options.workflowdir.split(';') wf_file = None for dir in wf_path: