Description
The encodeList function in user.py (line 157 in particular) contains the following:
Obviously, the intention of lines 3 & 4 is to skip any of the items that might be None rather than appending them to to the output list.
if obj: is if obj.__nonzero__(): not if obj is None:!
The problem is that NoneType doesn't have a strip() function, so the code raises an exception at line 2 above.
I encountered this error when attempting to use the quicklink action with my server setup... which, it seems, is even more deeply broken than just this. More on that when I figure it out.
MoinMoin Version |
1.5 |
OS and Version |
Fedora 4 |
Python Version |
2.4 |
Server Setup |
Mod Python |
Server Details |
Apache 2 |
Workaround
Moving the "strip()" line above down to after the continue statement allows the if not item check to do its job, and filter out Nones, thus solving the problem.
Result as follows:
This is a bug, since then whitespace strings are not removed. Better fix:
item = (item or '').strip() if not item:
Discussion
The bug was in user.quicklinkPage, that added None to the list when interwikiname was None.
Plan
- Priority:
- Assigned to:
- Status: fixed in patch-90