diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-12 09:40:08 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-12 09:40:08 -0400 |
commit | fdf47ccf128645bd099f7da80487320e086d17fe (patch) | |
tree | f5652eab2e9efa7ec26cade6c5ecabdd5a067929 /src/lib/Bcfg2/Options | |
parent | af02b7f106f581bd4e01a3326ccf5644ae96d1d4 (diff) | |
download | bcfg2-fdf47ccf128645bd099f7da80487320e086d17fe.tar.gz bcfg2-fdf47ccf128645bd099f7da80487320e086d17fe.tar.bz2 bcfg2-fdf47ccf128645bd099f7da80487320e086d17fe.zip |
testsuite: fixed more unit tests
Diffstat (limited to 'src/lib/Bcfg2/Options')
-rw-r--r-- | src/lib/Bcfg2/Options/Subcommands.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Options/Subcommands.py b/src/lib/Bcfg2/Options/Subcommands.py index b529dd7fe..7d7a3f928 100644 --- a/src/lib/Bcfg2/Options/Subcommands.py +++ b/src/lib/Bcfg2/Options/Subcommands.py @@ -197,8 +197,10 @@ class CommandRegistry(object): cmd_obj = cmdcls() name = cmdcls.__name__.lower() cls.commands[name] = cmd_obj + # py2.5 can't mix *magic and non-magical keyword args, thus + # the **dict(...) cls.options.append( - Subparser(*cmdcls.options, name=name, help=cmdcls.__doc__)) + Subparser(*cmdcls.options, **dict(name=name, help=cmdcls.__doc__))) if issubclass(cls, cmd.Cmd) and cmdcls.interactive: setattr(cls, "do_%s" % name, cmd_obj) setattr(cls, "help_%s" % name, cmd_obj.parser.print_help) |