web/schemaviewer.py
changeset 10612 84468b90e9c1
parent 9704 43c9896d0e9f
child 10662 10942ed172de
--- a/web/schemaviewer.py	Wed Sep 16 11:23:51 2015 +0200
+++ b/web/schemaviewer.py	Mon Sep 14 16:03:07 2015 +0200
@@ -20,6 +20,8 @@
 __docformat__ = "restructuredtext en"
 _ = unicode
 
+from six import string_types
+
 from logilab.common.ureports import Section, Title, Table, Link, Span, Text
 
 from yams.schema2dot import CARD_MAP
@@ -226,7 +228,7 @@
                     elif isinstance(val, (list, tuple)):
                         val = sorted(val)
                         val = ', '.join(str(v) for v in val)
-                    elif val and isinstance(val, basestring):
+                    elif val and isinstance(val, string_types):
                         val = _(val)
                     else:
                         val = str(val)