From b8711bd597435d0bb95aef3a0c9f2dedd467b3c5 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Sun, 17 Sep 2000 06:40:42 +0000 Subject: maketext(): Default dict argument to None, which means empty list. --- Mailman/Utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mailman/Utils.py b/Mailman/Utils.py index 734f20cb4..a1652026f 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -473,13 +473,15 @@ class SafeDict(UserDict): return '' % `key` -def maketext(templatefile, dict, raw=0): +def maketext(templatefile, dict=None, raw=0): """Make some text from a template file. Reads the `templatefile', relative to mm_cfg.TEMPLATE_DIR, does string substitution by interpolating in the `dict', and if `raw' is false, wraps/fills the resulting text by calling wrap(). """ + if dict is None: + dict = {} file = os.path.join(mm_cfg.TEMPLATE_DIR, templatefile) fp = open(file) template = fp.read() -- cgit v1.3.1