src/pyams_utils/html.py
changeset 65 326d216d3fc2
parent 1 3f89629b9e54
child 72 9049384a2bd4
--- a/src/pyams_utils/html.py	Thu Jun 02 16:40:06 2016 +0200
+++ b/src/pyams_utils/html.py	Thu Jun 02 16:40:39 2016 +0200
@@ -76,8 +76,8 @@
     def handle_data(self, data):
         try:
             self.data += data
-        except:
-            self.data += data.decode('utf8')
+        except TypeError:
+            self.data += data.decode('utf-8')
 
     def handle_entityref(self, name):
         self.data += self.entitydefs.get(name, '')