Jaymon / captain

command line python scripts for humans

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

argument parser not setting dest correctly

Jaymon opened this issue · comments

@arg("--out", dest="stream", help="this should be in stream variable")
def main(**kwargs):
    kwargs["stream"] # KeyError, but kwargs["out"] would work

Captain is putting the argument into out instead of stream, not sure why. Interestingly enough:

@arg("--out", dest="stream", help="this should be in stream variable")
def main(stream, **kwargs):
    pass

works, --out is put into the stream variable