diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 12:21:18 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 12:21:18 -0500 |
commit | 845dbe03bee981bcc5d24ef06ca868042968aa4c (patch) | |
tree | 83672d245b08a7a9456f3c29fa62885b13361bfa /beautifulsoup/builder/__init__.py | |
parent | 945b719a28c229178e710b749d2af4d00a81bdba (diff) |
Made Unicode, Dammit more PEP-8 compliant.
Diffstat (limited to 'beautifulsoup/builder/__init__.py')
-rw-r--r-- | beautifulsoup/builder/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/beautifulsoup/builder/__init__.py b/beautifulsoup/builder/__init__.py index 5bf5929..a5e1b06 100644 --- a/beautifulsoup/builder/__init__.py +++ b/beautifulsoup/builder/__init__.py @@ -120,7 +120,7 @@ class HTMLTreeBuilder(TreeBuilder): # This is an interesting meta tag. match = self.CHARSET_RE.search(content) if match: - if (self.soup.declaredHTMLEncoding is not None or + if (self.soup.declared_html_encoding is not None or self.soup.originalEncoding == self.soup.fromEncoding): # An HTML encoding was sniffed while converting # the document to Unicode, or an HTML encoding was @@ -137,8 +137,8 @@ class HTMLTreeBuilder(TreeBuilder): new_charset = match.group(3) if (new_charset is not None and new_charset != self.soup.originalEncoding): - self.soup.declaredHTMLEncoding = new_charset - self.soup._feed(self.soup.declaredHTMLEncoding) + self.soup.declared_html_encoding = new_charset + self.soup._feed(self.soup.declared_html_encoding) raise StopParsing pass return False |