Modify ↓
Ticket #672 (closed enhancement: fixed)
bcfg2-admin should not process any config files when help is requested
Reported by: | Jon Nials <[email protected]…> | Owned by: | solj |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-server | Version: | 1.0 |
Keywords: | bcfg2-admin Packages | Cc: | [email protected]… |
Description
bcfg2-admin should NOT process the Packages/config.xml if any help command is executed.
Recreate:
bcfg2-admin minestruct help
produces output and refreshes the cache. It should only do this if you actually execute a command.
Attachments
Change History
comment:1 Changed 14 years ago by solj
- Milestone changed from Bcfg2 1.0 Release to Bcfg2 1.0.1 Release
comment:2 Changed 14 years ago by solj
- Milestone changed from Bcfg2 1.0.1 Release to Bcfg2 1.1.0 Release
comment:3 Changed 13 years ago by solj
- Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.1.1 Release (Bugfix)
comment:4 Changed 13 years ago by solj
- Milestone changed from Bcfg2 1.1.1 Release (Bugfix) to Bcfg2 1.1.2 Release (Bugfix)
comment:5 Changed 12 years ago by solj
- Milestone changed from Bcfg2 1.1.2 Release (Bugfix) to Bcfg2 1.2.0 Release
comment:6 Changed 12 years ago by solj
- Cc [email protected]… added
- Owner changed from desai to solj
- Status changed from new to accepted
I believe that this patch should fix the problem.
diff --git a/src/lib/Server/Admin/__init__.py b/src/lib/Server/Admin/__init__.py index b34d710..41c485d 100644 --- a/src/lib/Server/Admin/__init__.py +++ b/src/lib/Server/Admin/__init__.py @@ -53,9 +53,7 @@ class Mode(object): cfp = property(getCFP) def __call__(self, args): - if len(args) > 0 and args[0] == 'help': - print(self.__longhelp__) - raise SystemExit(0) + pass def errExit(self, emsg): print(emsg) diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin index 36be6ab..419d223 100755 --- a/src/sbin/bcfg2-admin +++ b/src/sbin/bcfg2-admin @@ -62,6 +62,9 @@ def main(): if args[0] in get_modes(): modname = args[0].capitalize() + if args[1] == 'help': + print(mode_import(modname).__longhelp__) + raise SystemExit(0) try: mode_cls = mode_import(modname) except ImportError:
comment:7 Changed 12 years ago by solj
- Status changed from accepted to closed
- Resolution set to fixed
Applied in 34b0e09aed52103d6b1ed2da1c2dac57b4e5c5d0.
Note: See
TracTickets for help on using
tickets.