summaryrefslogtreecommitdiff
path: root/src/mailman/commands/cli_withlist.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-04-30 13:34:04 -0400
committerGitLab2016-04-30 19:54:54 +0000
commitc6eb7ee3e574b48ee016dd31af2014b0ed083268 (patch)
tree14c1f1e7bb382898ee50909333365aab335aa4a1 /src/mailman/commands/cli_withlist.py
parent465f24ff33e154385322ee894d32d8b7dd9b3941 (diff)
downloadmailman-c6eb7ee3e574b48ee016dd31af2014b0ed083268.tar.gz
mailman-c6eb7ee3e574b48ee016dd31af2014b0ed083268.tar.zst
mailman-c6eb7ee3e574b48ee016dd31af2014b0ed083268.zip
Diffstat (limited to 'src/mailman/commands/cli_withlist.py')
-rw-r--r--src/mailman/commands/cli_withlist.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mailman/commands/cli_withlist.py b/src/mailman/commands/cli_withlist.py
index 79dc3b966..127308a05 100644
--- a/src/mailman/commands/cli_withlist.py
+++ b/src/mailman/commands/cli_withlist.py
@@ -20,7 +20,7 @@
import re
import sys
-from contextlib import ExitStack
+from contextlib import ExitStack, suppress
from functools import partial
from lazr.config import as_boolean
from mailman import public
@@ -222,10 +222,8 @@ class Withlist:
}
history_file = Template(
history_file_template).safe_substitute(substitutions)
- try:
+ with suppress(FileNotFoundError):
readline.read_history_file(history_file)
- except FileNotFoundError:
- pass
resources.callback(
readline.write_history_file,
history_file)