diff options
| author | Barry Warsaw | 2011-10-16 15:31:28 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-10-16 15:31:28 -0400 |
| commit | a8b8be8ad7510c095c3232c25f2c2e3e54d44352 (patch) | |
| tree | a44d5202941b6bc59177bfe86a33f3a216870bd6 /src/mailman/commands/cli_control.py | |
| parent | 24c3bafeb6551aa52a2df3c1b151b4bde07c3de0 (diff) | |
| download | mailman-a8b8be8ad7510c095c3232c25f2c2e3e54d44352.tar.gz mailman-a8b8be8ad7510c095c3232c25f2c2e3e54d44352.tar.zst mailman-a8b8be8ad7510c095c3232c25f2c2e3e54d44352.zip | |
* `bin/mailman start --force` option is fixed. (LP: #869317)
* acquire_lock_1(): No need to unlink the tempfile
* Start.process(): Don't print error message when the lock is in stale_lock
or host_mismatch status and --force has been given.
* control.rst: Refactor test code into test_control.py.
* test_create.py: To more accurately mimic argparse, FakeParser.error() needs
to `sys.exit(1)`. The `SystemExit` must also be caught in the appropriate
tests.
* logging.py: Locking is now down by the flufl.lock package, so apply the
`mailman.lock` configuration to it.
Diffstat (limited to 'src/mailman/commands/cli_control.py')
| -rw-r--r-- | src/mailman/commands/cli_control.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman/commands/cli_control.py b/src/mailman/commands/cli_control.py index 2caaff54e..b2dc1bdd0 100644 --- a/src/mailman/commands/cli_control.py +++ b/src/mailman/commands/cli_control.py @@ -101,8 +101,10 @@ class Start: if status is WatcherState.conflict: self.parser.error(_('GNU Mailman is already running')) elif status in (WatcherState.stale_lock, WatcherState.host_mismatch): - self.parser.error(_('A previous run of GNU Mailman did not exit ' - 'cleanly. Try using --force.')) + if args.force is None: + self.parser.error( + _('A previous run of GNU Mailman did not exit ' + 'cleanly. Try using --force.')) def log(message): if not args.quiet: print message |
