changeset 989:2d9346a99352 trunk

Remove unused isinstance checks.
author hodgestar
date Sat, 26 Jan 2013 11:38:35 +0000
parents 480cf1be291a
children 8f00b78c6a59
files genshi/input.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/genshi/input.py
+++ b/genshi/input.py
@@ -366,9 +366,7 @@
         fixed_attrib = []
         for name, value in attrib: # Fixup minimized attributes
             if value is None:
-                value = unicode(name)
-            elif not isinstance(value, unicode):
-                value = value.decode(self.encoding, 'replace')
+                value = name
             fixed_attrib.append((QName(name), stripentities(value)))
 
         self._enqueue(START, (QName(tag), Attrs(fixed_attrib)))
@@ -386,8 +384,6 @@
                     break
 
     def handle_data(self, text):
-        if not isinstance(text, unicode):
-            text = text.decode(self.encoding, 'replace')
         self._enqueue(TEXT, text)
 
     def handle_charref(self, name):
Copyright (C) 2012-2017 Edgewall Software