mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-12 10:49:17 +00:00
Format the complex epilog of nodemedia
nodemedia has non-option arguments suggesting need for line wraps. Provide a custom formatter to enable readable usage.
This commit is contained in:
parent
98a763eb35
commit
37f0345553
@ -135,15 +135,21 @@ funmap = {
|
||||
}
|
||||
|
||||
|
||||
class OptParser(optparse.OptionParser):
|
||||
|
||||
def format_epilog(self, formatter):
|
||||
return self.expand_prog_name(self.epilog)
|
||||
|
||||
def main():
|
||||
argparser = optparse.OptionParser(
|
||||
argparser = OptParser(
|
||||
usage="Usage: %prog <noderange> [list|upload|attach|detachall] "
|
||||
"<filename>|all|<url>",
|
||||
epilog='upload will take the specified file and upload it to the BMC, '
|
||||
epilog='\nupload will take the specified file and upload it to the '
|
||||
'BMC.\n\n'
|
||||
'attach will instruct the BMC to connect a remote media to the '
|
||||
'specified url, and detachall will remove all uploaded and'
|
||||
'attached urls from the BMC, list shows currently mounted '
|
||||
'media.')
|
||||
'specified url.\n\ndetachall will remove *ALL* uploaded and '
|
||||
'attached urls from the BMC\n\nlist shows currently mounted '
|
||||
'media.\n')
|
||||
(options, args) = argparser.parse_args()
|
||||
media = None
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user