diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2008-09-12 21:25:16 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2008-09-12 21:25:16 +0000 |
commit | 01e56e153fd83c0b51760cf4ec04cc07e39bcc1b (patch) | |
tree | 8999bb657bb258d41d83244c0506c43956775512 /src/lib/Server/Admin/Tidy.py | |
parent | cd78f764f64ea2984c6382a20b7ffd7d44345995 (diff) | |
download | bcfg2-01e56e153fd83c0b51760cf4ec04cc07e39bcc1b.tar.gz bcfg2-01e56e153fd83c0b51760cf4ec04cc07e39bcc1b.tar.bz2 bcfg2-01e56e153fd83c0b51760cf4ec04cc07e39bcc1b.zip |
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
Diffstat (limited to 'src/lib/Server/Admin/Tidy.py')
-rw-r--r-- | src/lib/Server/Admin/Tidy.py | 17 |
1 files changed, 13 insertions, 4 deletions
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 |