diff options
| author | bwarsaw | 1999-09-03 05:55:51 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-09-03 05:55:51 +0000 |
| commit | d3219f6279e9e1a6e7978536ff64495b05b75e1c (patch) | |
| tree | a9f9c04d764a6a0c45aee7242967fba2cba7132a /Mailman/Utils.py | |
| parent | e64d42636221c0a9acefc4495022a9b3fb84577d (diff) | |
| download | mailman-d3219f6279e9e1a6e7978536ff64495b05b75e1c.tar.gz mailman-d3219f6279e9e1a6e7978536ff64495b05b75e1c.tar.zst mailman-d3219f6279e9e1a6e7978536ff64495b05b75e1c.zip | |
SafeDict.__init__(): UserDict optional initial dict arg is a Python
1.5.2-ism. Here's a more portable implementation.
Diffstat (limited to 'Mailman/Utils.py')
| -rw-r--r-- | Mailman/Utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index 46b01d864..6f0ca661d 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -628,7 +628,10 @@ class SafeDict(UserDict): This is used in maketext so that editing templates is a bit more robust. """ def __init__(self, d): - UserDict.__init__(self, d) + # optional initial dictionary is a Python 1.5.2-ism. Do it this way + # for portability + UserDict.__init__(self) + self.update(d) def __getitem__(self, key): try: |
