Mercurial > genshi > mirror
changeset 844:1ae18bca8de4 trunk
Fix two instances of using None, which would cause an AttributeError.
Submitted by: Jon Nelson
author | jruigrok |
---|---|
date | Mon, 29 Jun 2009 09:33:02 +0000 |
parents | d10e5bceaa1f |
children | 4ec4377f49ee |
files | genshi/filters/html.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/genshi/filters/html.py +++ b/genshi/filters/html.py @@ -88,7 +88,7 @@ elif in_form: if tagname == 'input': - type = attrs.get('type').lower() + type = attrs.get('type', '').lower() if type in ('checkbox', 'radio'): name = attrs.get('name') if name and name in self.data: @@ -110,7 +110,7 @@ attrs |= [(QName('checked'), 'checked')] elif 'checked' in attrs: attrs -= 'checked' - elif type in (None, 'hidden', 'text') \ + elif type in ('', 'hidden', 'text') \ or type == 'password' and self.passwords: name = attrs.get('name') if name and name in self.data: