diff options
Diffstat (limited to 'bitbake/lib/bs4/builder/__init__.py')
-rw-r--r-- | bitbake/lib/bs4/builder/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bs4/builder/__init__.py b/bitbake/lib/bs4/builder/__init__.py index 740f5f29cd..6ccd4d23d6 100644 --- a/bitbake/lib/bs4/builder/__init__.py +++ b/bitbake/lib/bs4/builder/__init__.py | |||
@@ -80,9 +80,12 @@ builder_registry = TreeBuilderRegistry() | |||
80 | class TreeBuilder(object): | 80 | class TreeBuilder(object): |
81 | """Turn a document into a Beautiful Soup object tree.""" | 81 | """Turn a document into a Beautiful Soup object tree.""" |
82 | 82 | ||
83 | NAME = "[Unknown tree builder]" | ||
84 | ALTERNATE_NAMES = [] | ||
83 | features = [] | 85 | features = [] |
84 | 86 | ||
85 | is_xml = False | 87 | is_xml = False |
88 | picklable = False | ||
86 | preserve_whitespace_tags = set() | 89 | preserve_whitespace_tags = set() |
87 | empty_element_tags = None # A tag will be considered an empty-element | 90 | empty_element_tags = None # A tag will be considered an empty-element |
88 | # tag when and only when it has no contents. | 91 | # tag when and only when it has no contents. |
@@ -153,13 +156,13 @@ class TreeBuilder(object): | |||
153 | universal = self.cdata_list_attributes.get('*', []) | 156 | universal = self.cdata_list_attributes.get('*', []) |
154 | tag_specific = self.cdata_list_attributes.get( | 157 | tag_specific = self.cdata_list_attributes.get( |
155 | tag_name.lower(), None) | 158 | tag_name.lower(), None) |
156 | for attr in attrs.keys(): | 159 | for attr in list(attrs.keys()): |
157 | if attr in universal or (tag_specific and attr in tag_specific): | 160 | if attr in universal or (tag_specific and attr in tag_specific): |
158 | # We have a "class"-type attribute whose string | 161 | # We have a "class"-type attribute whose string |
159 | # value is a whitespace-separated list of | 162 | # value is a whitespace-separated list of |
160 | # values. Split it into a list. | 163 | # values. Split it into a list. |
161 | value = attrs[attr] | 164 | value = attrs[attr] |
162 | if isinstance(value, basestring): | 165 | if isinstance(value, str): |
163 | values = whitespace_re.split(value) | 166 | values = whitespace_re.split(value) |
164 | else: | 167 | else: |
165 | # html5lib sometimes calls setAttributes twice | 168 | # html5lib sometimes calls setAttributes twice |