diff options
Diffstat (limited to 'src/sbin/bcfg2-admin')
-rwxr-xr-x | src/sbin/bcfg2-admin | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin index f8b82d201..2c9a43859 100755 --- a/src/sbin/bcfg2-admin +++ b/src/sbin/bcfg2-admin @@ -12,7 +12,6 @@ log = logging.getLogger('bcfg2-admin') import Bcfg2.Server.Admin - def mode_import(modename): """Load Bcfg2.Server.Admin.<mode>.""" modname = modename.capitalize() @@ -20,12 +19,10 @@ def mode_import(modename): (modname)).Server.Admin, modname) return getattr(mod, modname) - def get_modes(): """Get all available modes, except for the base mode.""" return [x.lower() for x in Bcfg2.Server.Admin.__all__ if x != 'mode'] - def create_description(): """Create the description string from the list of modes.""" modes = get_modes() @@ -39,7 +36,6 @@ def create_description(): continue return description.getvalue() - def main(): Bcfg2.Logger.setup_logging('bcfg2-admin', to_console=True, level=40) usage = "Usage: %prog [options] MODE [args]" @@ -60,7 +56,7 @@ def main(): else: # Print short help for all modes parser.print_help() - print(create_description()) + print create_description() raise SystemExit(0) if args[0] in get_modes(): @@ -77,7 +73,7 @@ def main(): else: log.error("Unknown mode %s" % args[0]) parser.print_help() - print(create_description()) + print create_description() raise SystemExit(1) if __name__ == '__main__': |