summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/netcmd/__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py
index ec2d22214d..677f4f0fc2 100644
--- a/source4/scripting/python/samba/netcmd/__init__.py
+++ b/source4/scripting/python/samba/netcmd/__init__.py
@@ -40,6 +40,11 @@ class PlainHelpFormatter(optparse.IndentedHelpFormatter):
result = "\n".join(wrapped_paragraphs) + "\n"
return result
+ def format_epilog(self, epilog):
+ if epilog:
+ return "\n" + epilog + "\n"
+ else:
+ return ""
class Command(object):
"""A samba-tool command."""
@@ -117,12 +122,12 @@ class Command(object):
if force_traceback or samba.get_debug_level() >= 3:
traceback.print_tb(etraceback)
- def _create_parser(self, prog):
+ def _create_parser(self, prog, epilog=None):
parser = optparse.OptionParser(
usage=self.synopsis,
description=self.full_description,
formatter=PlainHelpFormatter(),
- prog=prog)
+ prog=prog,epilog=epilog)
parser.add_options(self.takes_options)
optiongroups = {}
for name, optiongroup in self.takes_optiongroups.iteritems():