From 01e56e153fd83c0b51760cf4ec04cc07e39bcc1b Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Fri, 12 Sep 2008 21:25:16 +0000 Subject: Improve help messages for bcfg2-admin (and modes) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4910 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Admin/Tidy.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/lib/Server/Admin/Tidy.py') diff --git a/src/lib/Server/Admin/Tidy.py b/src/lib/Server/Admin/Tidy.py index 287b34310..b53bde5ef 100644 --- a/src/lib/Server/Admin/Tidy.py +++ b/src/lib/Server/Admin/Tidy.py @@ -2,11 +2,19 @@ import Bcfg2.Server.Admin import re, os, socket class Tidy(Bcfg2.Server.Admin.Mode): - __shorthelp__ = 'bcfg2-admin tidy [-f] [-I]' - __longhelp__ = __shorthelp__ + '\n\tClean up useless files in the repo' + __shorthelp__ = "Clean up useless files in the repo" + __longhelp__ = __shorthelp__ + "\nbcfg2-admin tidy [-f] [-I]" + __usage__ = ("bcfg2-admin tidy [options]\n\n" + " %-25s%s\n" + " %-25s%s\n" + " %-25s%s\n" % + ("-f", + "force", + "-I", + "interactive")) def __init__(self, cfile): - Bcfg2.Server.Admin.Mode.__init__(self, cfile) + Bcfg2.Server.Admin.Mode.__init__(self, cfile) def __call__(self, args): Bcfg2.Server.Admin.Mode.__call__(self, args) @@ -49,7 +57,8 @@ class Tidy(Bcfg2.Server.Admin.Mode): to_remove.append("%s/SSHbase/%s" % (self.get_repo_path(), name)) else: if hostmatcher.match(name).group(1) in bad: - to_remove.append("%s/SSHbase/%s" % (self.get_repo_path(), name)) + to_remove.append("%s/SSHbase/%s" % + (self.get_repo_path(), name)) # clean up file~ # clean up files without parsable names in Cfg return to_remove -- cgit v1.2.3-1-g7c22