diff options
| author | bwarsaw | 2006-12-29 22:20:25 +0000 |
|---|---|---|
| committer | bwarsaw | 2006-12-29 22:20:25 +0000 |
| commit | f4a456a83b630feb294724ab462c87ca1ce1c3ae (patch) | |
| tree | c5c88540dae8306d11671f603d8975b01803ea16 /Mailman/htmlformat.py | |
| parent | ae185106a624bfa7888aa8722d35194d3c5150e8 (diff) | |
| download | mailman-f4a456a83b630feb294724ab462c87ca1ce1c3ae.tar.gz mailman-f4a456a83b630feb294724ab462c87ca1ce1c3ae.tar.zst mailman-f4a456a83b630feb294724ab462c87ca1ce1c3ae.zip | |
Diffstat (limited to 'Mailman/htmlformat.py')
| -rw-r--r-- | Mailman/htmlformat.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Mailman/htmlformat.py b/Mailman/htmlformat.py index ae0007794..1bf9548ed 100644 --- a/Mailman/htmlformat.py +++ b/Mailman/htmlformat.py @@ -36,12 +36,11 @@ NL = '\n' # Format an arbitrary object. def HTMLFormatObject(item, indent): "Return a presentation of an object, invoking their Format method if any." - if type(item) == type(''): - return item - elif not hasattr(item, "Format"): - return `item` - else: + if hasattr(item, 'Format'): return item.Format(indent) + if isinstance(item, basestring): + return item + return str(item) def CaseInsensitiveKeyedDict(d): result = {} |
