--- a/misc/migration/postcreate.py Tue Sep 15 18:30:05 2015 +0200
+++ b/misc/migration/postcreate.py Tue Sep 15 18:39:09 2015 +0200
@@ -18,12 +18,14 @@
"""cubicweb post creation script, set user's workflow"""
from __future__ import print_function
+from six import text_type
+
# insert versions
create_entity('CWProperty', pkey=u'system.version.cubicweb',
- value=unicode(config.cubicweb_version()))
+ value=text_type(config.cubicweb_version()))
for cube in config.cubes():
create_entity('CWProperty', pkey=u'system.version.%s' % cube.lower(),
- value=unicode(config.cube_version(cube)))
+ value=text_type(config.cube_version(cube)))
# some entities have been added before schema entities, fix the 'is' and
# 'is_instance_of' relations
@@ -51,7 +53,7 @@
print('Hopefully this is not a production instance...')
elif anonlogin:
from cubicweb.server import create_user
- create_user(session, unicode(anonlogin), anonpwd, u'guests')
+ create_user(session, text_type(anonlogin), anonpwd, u'guests')
# need this since we already have at least one user in the database (the default admin)
for user in rql('Any X WHERE X is CWUser').entities():