[Python-modules-commits] [utidylib] 06/16: Revert "Fix handling of unicode strings"

Michal Cihar nijel at moszumanska.debian.org
Thu Jul 7 12:53:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

nijel pushed a commit to branch master
in repository utidylib.

commit 30bdb9ea08baf1cc6a2dd56b74e96ce793e74745
Author: Michal Čihař <michal at cihar.com>
Date:   Thu Jul 7 14:39:30 2016 +0200

    Revert "Fix handling of unicode strings"
    
    This reverts commit bc6e3a16c7e73e304e3071b9680a30da44b26ad2.
---
 tidy/lib.py | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/tidy/lib.py b/tidy/lib.py
index be0c11b..5f0dbce 100644
--- a/tidy/lib.py
+++ b/tidy/lib.py
@@ -204,13 +204,6 @@ class DocumentFactory(FactoryDict):
         @param st: the string to parse
         @return: a document object
         """
-        if type(st) == unicode:
-            try:
-                enc = kwargs['char_encoding']
-            except KeyError:
-                enc = 'utf8'
-                kwargs['char_encoding'] = enc
-            st = st.encode(enc)
         doc = self._create(**kwargs)
         self.loadString(doc, st)
         return doc

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/utidylib.git



More information about the Python-modules-commits mailing list