changeset 1942:ef3b90a72626 namespaces

indexing: fix extraction of item_name from meta[NAME] when it is a list
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 03 Feb 2013 23:34:16 +0100
parents 9136b83cce24
children df9505660776
files MoinMoin/storage/middleware/indexing.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/middleware/indexing.py	Sun Feb 03 23:14:38 2013 +0100
+++ b/MoinMoin/storage/middleware/indexing.py	Sun Feb 03 23:34:16 2013 +0100
@@ -156,8 +156,11 @@
             return self.data.tell(*args, **kw)
 
     if not item_name:
-        # only used for logging, below
-        item_name = unicode(meta[NAME])
+        names = meta.get(NAME)
+        if names:
+            item_name = names[0]
+        else:
+            item_name = u'anonymous'
 
     rev = PseudoRev(meta, data)
     try: