]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commit
Fix option parsing for destination arg 3/head
authorChristophe Courtaut <christophe.courtaut@gmail.com>
Tue, 15 Oct 2013 10:09:06 +0000 (12:09 +0200)
committerChristophe Courtaut <christophe.courtaut@gmail.com>
Tue, 15 Oct 2013 10:13:51 +0000 (12:13 +0200)
commit2b9844dbb2f855c5007ece63ac3817885d6e8fab
tree1d4eb554b9a3f7d207a3b40ab978156513df1ee8
parent02e9d9d3d7994bafe20ad4b73c8137afc2baa211
Fix option parsing for destination arg

As mentionned at http://docs.python.org/3.4/library/argparse.html#nargs,
nargs=1 will not provide the default behaviour, but instead will produce
a list of args, and that is not what we want.

This patch uses nargs=None to provide default behaviour instead.

As it is a positionnal argument, we can't use required option.

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
radosgw_agent/cli.py