diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-14 00:04:26 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-14 00:04:26 -0400 |
commit | 42ea15e472ffeb13450cd0d31322a28b581bd392 (patch) | |
tree | 3b55af74cd5b18ad2474ce5824a206e2dda83e6d /examples | |
parent | 3747fb893bddd7b77373df885d94f25da98ab738 (diff) | |
download | cmd2-git-42ea15e472ffeb13450cd0d31322a28b581bd392.tar.gz |
Updated documentation
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/help_categories.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/help_categories.py b/examples/help_categories.py index e58bac02..62351e81 100755 --- a/examples/help_categories.py +++ b/examples/help_categories.py @@ -7,6 +7,7 @@ A sample application for tagging categories on commands. import argparse import cmd2 +from cmd2.cmd2 import COMMAND_NAME class HelpCategories(cmd2.Cmd): @@ -143,7 +144,9 @@ class HelpCategories(cmd2.Cmd): @cmd2.with_category("Command Management") def do_disable_commands(self, _): """Disable the Application Management commands""" - self.disable_category(self.CMD_CAT_APP_MGMT, "Application Management is currently disabled") + message_to_print = "{} is not available while {} commands are disabled".format(COMMAND_NAME, + self.CMD_CAT_APP_MGMT) + self.disable_category(self.CMD_CAT_APP_MGMT, message_to_print) self.poutput("The Application Management commands have been disabled") @cmd2.with_category("Command Management") |