Use list of strings instead of block string for config changes

This commit is contained in:
Adam Goldsmith 2023-01-09 22:07:56 -05:00
parent ff944231d8
commit 812affd0ae

View File

@ -51,26 +51,27 @@ class ListManager:
) )
def config_list(self): def config_list(self):
config_changes = """ config_changes = "\n".join(
[
# TODO: set real_name, moderator, subject prefix, and reply-to address # TODO: set real_name, moderator, subject prefix, and reply-to address
from_is_list = 1 "from_is_list = 1",
anonymous_list = 1 "anonymous_list = 1",
first_strip_reply_to = 1 "first_strip_reply_to = 1",
reply_goes_to_list = 2 # Use explicit address for Reply-To
"reply_goes_to_list = 2",
# quiet member management # quiet member management
send_reminders = 0 "send_reminders = 0",
send_welcome_msg = 0 "send_welcome_msg = 0",
send_goodbye_msg = 0 "send_goodbye_msg = 0",
# ConcealSubscription | DontReceiveDuplicates
new_member_options = 272 "new_member_options = 272",
advertised = 0 "advertised = 0",
private_roster = 2 # only admins can view the roster "private_roster = 2", # only admins can view the roster
default_member_moderation = 1 "default_member_moderation = 1",
"generic_nonmember_action = 3", # discard non-member emails
generic_nonmember_action = 3 # discard non-member emails "forward_auto_discards = 0", # don't notify admin about discards
forward_auto_discards = 0 # don't notify admin about discards ]
""" )
with tempfile.NamedTemporaryFile("w", suffix=".py") as config_file: with tempfile.NamedTemporaryFile("w", suffix=".py") as config_file:
config_file.write(config_changes) config_file.write(config_changes)