From 3de72bb8c3bb0f0e71357657a256fe33cb65c168 Mon Sep 17 00:00:00 2001 From: Michael Fenn Date: Fri, 29 Mar 2013 10:31:07 -0400 Subject: Update bcfg2-info OptionParser to use client options bcfg2-info uses CLI_COMMON_OPTIONS which is a subset of the full CLIENT_COMMON_OPTIONS that the bcfg2 client uses. This causes bcfg2-info to fail on the builddir comand with the following traceback > builddir drdws0056.nyc.desres.deshaw.com /tmp/drdws0056 Command failure Traceback (most recent call last): File "/usr/sbin/bcfg2-info", line 157, in do_loop self.cmdloop('Welcome to bcfg2-info\n' File "/usr/lib64/python2.4/cmd.py", line 142, in cmdloop stop = self.onecmd(line) File "/usr/lib64/python2.4/cmd.py", line 219, in onecmd return func(arg) File "/usr/sbin/bcfg2-info", line 283, in do_builddir client_config) File "/usr/lib/python2.4/site-packages/Bcfg2/Client/Tools/POSIX/__init__.py", line 19, in __init__ self.ppath = setup['ppath'] KeyError: 'ppath' ppath is included in CLIENT_COMMON_OPTIONS, but not CLI_COMMON_OPTIONS so this commit changes bcfg2-info to parse the fuller CLIENT_COMMON_OPTIONS. --- src/sbin/bcfg2-info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index cfcc95be2..b9aebe138 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -754,7 +754,7 @@ def main(): optinfo = dict(profile=Bcfg2.Options.CORE_PROFILE, interactive=Bcfg2.Options.INTERACTIVE, interpreter=Bcfg2.Options.INTERPRETER) - optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS) + optinfo.update(Bcfg2.Options.CLIENT_COMMON_OPTIONS) optinfo.update(Bcfg2.Options.SERVER_COMMON_OPTIONS) setup = Bcfg2.Options.OptionParser(optinfo) setup.hm = "\n".join([" bcfg2-info [options] [command ]", -- cgit v1.2.3-1-g7c22