changeset 121:9b1f916249b8

fs19: fix uuid type inconsistency (bytes vs. unicode)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 13 Mar 2011 23:31:10 +0100
parents 891c6d1551d4
children e90768ec963c
files MoinMoin/storage/backends/fs19.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/backends/fs19.py	Sun Mar 13 21:54:36 2011 +0100
+++ b/MoinMoin/storage/backends/fs19.py	Sun Mar 13 23:31:10 2011 +0100
@@ -20,7 +20,7 @@
 import hashlib
 
 from uuid import uuid4
-make_uuid = lambda: uuid4().hex
+make_uuid = lambda: unicode(uuid4().hex)
 
 MAX_NAME_LEN = 1000 # max length of a page name, page+attach name, user name
 UUID_LEN = len(make_uuid())
@@ -69,13 +69,13 @@
         metadata = MetaData()
         metadata.bind = engine
         self.users = Table('users', metadata,
-                           Column('uuid', String, index=True, unique=True),
+                           Column('uuid', Unicode, index=True, unique=True),
                            Column('name', Unicode, index=True, unique=username_unique),
                            Column('old_id', String, index=True, unique=True),
                            Column('refcount', Integer), # reference count in edit-log
                      )
         self.content = Table('content', metadata,
-                             Column('uuid', String, index=True, unique=True),
+                             Column('uuid', Unicode, index=True, unique=True),
                              Column('name', Unicode, index=True, unique=True),
                        )
         metadata.create_all()