From 0bef4bb2e560187feb5c58d75f24291102f8e211 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Thu, 11 Nov 1999 19:34:05 +0000 Subject: SafeDict.__init__(): default dictionary argument is optional. --- Mailman/Utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Mailman/Utils.py b/Mailman/Utils.py index c238959d4..889ce3366 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -674,11 +674,12 @@ class SafeDict(UserDict): This is used in maketext so that editing templates is a bit more robust. """ - def __init__(self, d): + def __init__(self, d=None): # optional initial dictionary is a Python 1.5.2-ism. Do it this way # for portability UserDict.__init__(self) - self.update(d) + if d is not None: + self.update(d) def __getitem__(self, key): try: -- cgit v1.2.3-70-g09d2