diff options
| author | Barry Warsaw | 2012-08-17 23:32:47 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-08-17 23:32:47 -0400 |
| commit | ffd6b7b2ec632920cbf9d413aa20d83d8333c87f (patch) | |
| tree | a75e7bff8ad7fd2340c61f16d4cac388ddec7730 /src/mailman/commands | |
| parent | 82d2ef15e3810abf984dc70c800dac3ebca02f03 (diff) | |
| download | mailman-ffd6b7b2ec632920cbf9d413aa20d83d8333c87f.tar.gz mailman-ffd6b7b2ec632920cbf9d413aa20d83d8333c87f.tar.zst mailman-ffd6b7b2ec632920cbf9d413aa20d83d8333c87f.zip | |
* Show devmode in `bin/mailman info` output. (LP: #1035028)
Also, allow doctest cleanups to be tuples, in which case the first item is the
callable and the subsequent items are the arguments. Makes for
config.pop()'ing much nicer.
Diffstat (limited to 'src/mailman/commands')
| -rw-r--r-- | src/mailman/commands/cli_info.py | 4 | ||||
| -rw-r--r-- | src/mailman/commands/docs/info.rst | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mailman/commands/cli_info.py b/src/mailman/commands/cli_info.py index 0e9c72f60..cd7269404 100644 --- a/src/mailman/commands/cli_info.py +++ b/src/mailman/commands/cli_info.py @@ -27,6 +27,7 @@ __all__ = [ import sys +from lazr.config import as_boolean from zope.interface import implementer from mailman.config import config @@ -68,6 +69,9 @@ class Info: print('Python', sys.version, file=output) print('config file:', config.filename, file=output) print('db url:', config.db.url, file=output) + print('devmode:', + 'ENABLED' if as_boolean(config.devmode.enabled) else 'DISABLED', + file=output) print('REST root url:', path_to('/'), file=output) print('REST credentials: {0}:{1}'.format( config.webservice.admin_user, config.webservice.admin_pass), diff --git a/src/mailman/commands/docs/info.rst b/src/mailman/commands/docs/info.rst index 7f69eada5..59801f234 100644 --- a/src/mailman/commands/docs/info.rst +++ b/src/mailman/commands/docs/info.rst @@ -37,6 +37,7 @@ By passing in the ``-o/--output`` option, you can print the info to a file. ... config file: .../test.cfg db url: ... + devmode: DISABLED REST root url: http://localhost:9001/3.0/ REST credentials: restadmin:restpass @@ -50,6 +51,7 @@ system paths that Mailman is using. ... [mailman] ... layout: fhs ... """) + >>> cleanups.append((config.pop, 'fhs')) >>> config.create_paths = True The File System Hierarchy layout is the same every by definition. @@ -73,9 +75,3 @@ The File System Hierarchy layout is the same every by definition. QUEUE_DIR = /var/spool/mailman TEMPLATE_DIR = .../mailman/templates VAR_DIR = /var/lib/mailman - - -Clean up -======== - - >>> config.pop('fhs') |
