all repos — listfix @ 26b673e88dd22601ff6dd4634f579f7b4842bb8b

Postfix Mailing List Software; Maintained on behalf the of Agency Economy Incorporated NFP.

Print a message if no lists are defined in the database.

	modified:   listfix.py
Brian Barto bartobrian@gmail.com
Wed, 30 Mar 2022 11:22:53 -0400
commit

26b673e88dd22601ff6dd4634f579f7b4842bb8b

parent

1da4175604a52d04176e76a70c67efa998168a70

1 files changed, 6 insertions(+), 3 deletions(-)

jump to
M listfix.pylistfix.py

@@ -70,9 +70,12 @@ email_out.send(r)

elif (command == "lists"): lists = db.get_lists() - for l in lists: - list_name = db.get_list_name(l) - print(f"{l} ({list_name})") + if (len(lists) == 0): + print("No lists defined.") + else: + for l in lists: + list_name = db.get_list_name(l) + print(f"{l} ({list_name})") elif (command == "dump"): list_email = args.get_list_email()