[py3] Replace unicode keyword which is unknown in python3 3.26
authorOlivier Giorgis <olivier.giorgis@logilab.fr>
Wed, 18 Jul 2018 11:27:05 +0200
branch3.26
changeset 12342 57e06dd166d4
parent 12340 b22d1d9316e4
child 12343 8362503a9248
[py3] Replace unicode keyword which is unknown in python3
cubicweb/_exceptions.py
--- a/cubicweb/_exceptions.py	Thu Jun 28 18:19:08 2018 +0200
+++ b/cubicweb/_exceptions.py	Wed Jul 18 11:27:05 2018 +0200
@@ -98,7 +98,7 @@
     def rtypes(self):
         if 'rtypes' in self.kwargs:
             return self.kwargs['rtypes']
-        cstrname = unicode(self.kwargs['cstrname'])
+        cstrname = text_type(self.kwargs['cstrname'])
         cstr = self.session.find('CWUniqueTogetherConstraint', name=cstrname).one()
         return sorted(rtype.name for rtype in cstr.relations)