summaryrefslogtreecommitdiff
path: root/src/mailman/commands/docs/conf.rst
diff options
context:
space:
mode:
authorBarry Warsaw2017-07-22 03:02:05 +0000
committerBarry Warsaw2017-07-22 03:02:05 +0000
commitf00b94f18e1d82d1488cbcee6053f03423bc2f49 (patch)
tree1a8e56dff0eab71e58e5fc9ecc5f3c614d7edca7 /src/mailman/commands/docs/conf.rst
parentf54c045519300f6f70947d1114f46c2b8ae0d368 (diff)
downloadmailman-f00b94f18e1d82d1488cbcee6053f03423bc2f49.tar.gz
mailman-f00b94f18e1d82d1488cbcee6053f03423bc2f49.tar.zst
mailman-f00b94f18e1d82d1488cbcee6053f03423bc2f49.zip
Diffstat (limited to 'src/mailman/commands/docs/conf.rst')
-rw-r--r--src/mailman/commands/docs/conf.rst20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/mailman/commands/docs/conf.rst b/src/mailman/commands/docs/conf.rst
index f465aab53..1a6a4679d 100644
--- a/src/mailman/commands/docs/conf.rst
+++ b/src/mailman/commands/docs/conf.rst
@@ -10,17 +10,12 @@ Mailman's configuration is divided in multiple sections which contain multiple
key-value pairs. The ``mailman conf`` command allows you to display a
specific key-value pair, or several key-value pairs.
- >>> class FakeArgs:
- ... key = None
- ... section = None
- ... output = None
- >>> from mailman.commands.cli_conf import Conf
- >>> command = Conf()
+ >>> command = cli('mailman.commands.cli_conf.conf')
To get a list of all key-value pairs of any section, you need to call the
command without any options.
- >>> command.process(FakeArgs)
+ >>> command('mailman conf')
[antispam] header_checks:
...
[logging.bounce] level: info
@@ -30,8 +25,7 @@ command without any options.
You can list all the key-value pairs of a specific section.
- >>> FakeArgs.section = 'shell'
- >>> command.process(FakeArgs)
+ >>> command('mailman conf --section shell')
[shell] banner: Welcome to the GNU Mailman shell
[shell] history_file:
[shell] prompt: >>>
@@ -40,9 +34,7 @@ You can list all the key-value pairs of a specific section.
You can also pass a key and display all key-value pairs matching the given
key, along with the names of the corresponding sections.
- >>> FakeArgs.section = None
- >>> FakeArgs.key = 'path'
- >>> command.process(FakeArgs)
+ >>> command('mailman conf --key path')
[logging.archiver] path: mailman.log
[logging.bounce] path: bounce.log
[logging.config] path: mailman.log
@@ -61,9 +53,7 @@ key, along with the names of the corresponding sections.
If you specify both a section and a key, you will get the corresponding value.
- >>> FakeArgs.section = 'mailman'
- >>> FakeArgs.key = 'site_owner'
- >>> command.process(FakeArgs)
+ >>> command('mailman conf --section mailman --key site_owner')
noreply@example.com