summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <julien.cristau@logilab.fr>2011-08-04 12:09:00 +0200
committerJulien Cristau <julien.cristau@logilab.fr>2011-08-04 12:09:00 +0200
commit4513031e6d3ad148becd05a61e5e7b0449cf4bf8 (patch)
treec1ac218b281b78b37d51537677431dab4b7a07ed
parente2dc55d9743c816d1815189ac90d095c00869e3e (diff)
downloadlogilab-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--ChangeLog2
-rw-r--r--clcommands.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index db96195..2507dfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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: