diff options
author | Julien Cristau <julien.cristau@logilab.fr> | 2011-08-04 12:09:00 +0200 |
---|---|---|
committer | Julien Cristau <julien.cristau@logilab.fr> | 2011-08-04 12:09:00 +0200 |
commit | 4513031e6d3ad148becd05a61e5e7b0449cf4bf8 (patch) | |
tree | c1ac218b281b78b37d51537677431dab4b7a07ed | |
parent | e2dc55d9743c816d1815189ac90d095c00869e3e (diff) | |
download | logilab-common-4513031e6d3ad148becd05a61e5e7b0449cf4bf8.tar.gz |
clcommands: fix the --rc-file option (closes #72450)
When --rc-file/-C is passed, the command we need to run is the next
argument on the command line, not "--rc-file" itself.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | clcommands.py | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -1,5 +1,7 @@ ChangeLog for logilab.common ============================ +-- + * clcommands: #72450 --rc-file option doesn't work 2011-06-09 -- 0.56.0 * clcommands: make registration possible by class decoration diff --git a/clcommands.py b/clcommands.py index a0b4d90..411931b 100644 --- a/clcommands.py +++ b/clcommands.py @@ -121,6 +121,7 @@ class CommandLine(dict): if rcfile is not None and arg in ('-C', '--rc-file'): try: rcfile = args.pop(0) + arg = args.pop(0) except IndexError: self.usage_and_exit(1) try: |