summaryrefslogtreecommitdiff
path: root/src/mailman/commands/cli_status.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-03-24 15:12:45 -0400
committerBarry Warsaw2016-03-24 15:12:45 -0400
commitd964be9f9a141772bb0538f7bc7ecfbf83950a02 (patch)
treeac64133d73352829e5d58deb3f7553098ae12f4b /src/mailman/commands/cli_status.py
parent8cc7e77b85f013d6f9ea4cda16ae18856fd6ccee (diff)
downloadmailman-d964be9f9a141772bb0538f7bc7ecfbf83950a02.tar.gz
mailman-d964be9f9a141772bb0538f7bc7ecfbf83950a02.tar.zst
mailman-d964be9f9a141772bb0538f7bc7ecfbf83950a02.zip
Diffstat (limited to 'src/mailman/commands/cli_status.py')
-rw-r--r--src/mailman/commands/cli_status.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mailman/commands/cli_status.py b/src/mailman/commands/cli_status.py
index 5673d33d6..7cc69850a 100644
--- a/src/mailman/commands/cli_status.py
+++ b/src/mailman/commands/cli_status.py
@@ -17,20 +17,16 @@
"""The `mailman status` subcommand."""
-__all__ = [
- 'Status',
- ]
-
-
import socket
+from mailman import public
from mailman.bin.master import WatcherState, master_state
from mailman.core.i18n import _
from mailman.interfaces.command import ICLISubCommand
from zope.interface import implementer
-
+@public
@implementer(ICLISubCommand)
class Status:
"""Status of the Mailman system."""
@@ -51,10 +47,10 @@ class Status:
message = _('GNU Mailman is running (master pid: $pid)')
elif status is WatcherState.stale_lock:
hostname, pid, tempfile = lock.details
- message =_('GNU Mailman is stopped (stale pid: $pid)')
+ message = _('GNU Mailman is stopped (stale pid: $pid)')
else:
hostname, pid, tempfile = lock.details
- fqdn_name = socket.getfqdn()
+ fqdn_name = socket.getfqdn() # flake8: noqa
assert status is WatcherState.host_mismatch, (
'Invalid enum value: %s' % status)
message = _('GNU Mailman is in an unexpected state '