[py3] changing unicode to str
py2 support being dropped, passing the code in full py3 str/bytes syntax
--- a/cubicweb/web/schemaviewer.py Tue Jun 11 09:07:24 2019 +0200
+++ b/cubicweb/web/schemaviewer.py Tue Jun 04 09:35:47 2019 +0200
@@ -42,7 +42,7 @@
self._ = req._
else:
encoding = 'ascii'
- self._ = unicode
+ self._ = str
self.encoding = encoding
# no self.req managements
@@ -239,6 +239,6 @@
def to_string(self, value):
"""used to converte arbitrary values to encoded string"""
- if isinstance(value, unicode):
+ if isinstance(value, str):
return value.encode(self.encoding, 'replace')
return str(value)