|
160 |
|
160 |
|
161 |
def attribute(self, token, base): |
161 |
def attribute(self, token, base): |
162 |
if 'name' in token.attrs: |
162 |
if 'name' in token.attrs: |
163 |
if token.attrs['name'] in base.info: |
163 |
if base and hasattr(base, 'info') and token.attrs['name'] in base.info: |
164 |
value = base.info[token.attrs['name']] |
164 |
value = base.info[token.attrs['name']] |
165 |
if isinstance(value, (list, tuple)): |
165 |
if isinstance(value, (list, tuple)): |
166 |
if not value or (isinstance(value, str) and value.lower() == 'none'): |
166 |
if not value or (isinstance(value, str) and value.lower() == 'none'): |