-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python 3/Plone 5.2: UTF-8-encode paths when traversing with python 2.
Workaround for zopefoundation/Zope#674 Fixes TypeError: 'int' object is not subscriptable
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d3a4495
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
base
as defined in line 193 should always be a native string.So line 194 and 195 should be removed as done in this commit.
After that is done I am not sure lines 197 and 198 are needed and so lines 200 and 201.
Also
objectIds()
should return native strings.If not line 205 should be
paths.insert(idx + 1, path + '/' + safe_nativestring(id))
.It seems to me that master version of this function should already work, but of course I am missing something :)
collective.solr/src/collective/solr/utils.py
Line 175 in f11937a
d3a4495
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll be damned, I can't reproduce the issue any more. Was probably caused by something else that has been fixed in the meantime. I'm removing the workaround; thanks for pointing it out!