summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw1999-11-11 19:34:05 +0000
committerbwarsaw1999-11-11 19:34:05 +0000
commit0bef4bb2e560187feb5c58d75f24291102f8e211 (patch)
treee9493facd621cb84f21c1ac39fecb6a0f9f59199
parent063cacc27b3b51f171974a08fb64f54fe8ec7107 (diff)
downloadmailman-0bef4bb2e560187feb5c58d75f24291102f8e211.tar.gz
mailman-0bef4bb2e560187feb5c58d75f24291102f8e211.tar.zst
mailman-0bef4bb2e560187feb5c58d75f24291102f8e211.zip
SafeDict.__init__(): default dictionary argument is optional.
-rw-r--r--Mailman/Utils.py5
1 files 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: