Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option parsing fails when multiple list options are specified and one is optional and not set #8

Closed
thasso opened this issue Jan 10, 2014 · 0 comments
Labels
Milestone

Comments

@thasso
Copy link
Owner

thasso commented Jan 10, 2014

For example:

#!/usr/bin/env jip
# grr
#
# usage:
#     grr -i <in>... [-o <out>...]
#
# inputs:
#     -i, --input <in>...  the input
#
# outputs:
#     -o, --output <out>...  the output
touch ${input} ${output}

an exception is raised if only input is given:

Traceback (most recent call last):
File "/apps/DEVEL/jip/0.3/bin/jip", line 9, in
load_entry_point('pyjip==0.3', 'console_scripts', 'jip')()
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/cli/jip_main.py", line 78, in main
_main()
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/cli/jip_main.py", line 135, in _main
runpy.run_module("jip.cli.jip_interpreter", run_name="main")
File "/usr/lib64/python2.6/runpy.py", line 140, in run_module
fname, loader, pkg_name)
File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/cli/jip_interpreter.py", line 63, in
main()
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/cli/jip_interpreter.py", line 59, in main
jip_run(jip_args + [script_file] + script_args)
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/cli/jip_run.py", line 52, in main
dry(script, script_args, dry=args['--dry'], show=args['--show'])
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/cli/init.py", line 566, in dry
jobs = jip.jobs.create_jobs(script, args=script_args)
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/jobs.py", line 994, in create_jobs
pipeline.expand(validate=validate)
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/pipelines.py", line 781, in expand
self._expand_merge_duplicates()
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/pipelines.py", line 1078, in _expand_merge_duplicates
opt_set = n._tool.options._get_value_set()
File "/apps/DEVEL/jip/0.3/lib/python/pyjip-0.3-py2.7-linux-x86_64.egg/jip/options.py", line 841, in _get_value_set
for v in vs]))
TypeError: unhashable type: 'list'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant