Ticket #5617 (closed Feature Request: fixed)

Opened 6 years ago

Last modified 5 years ago

ExtendedPathIndex needs to accept unicode object

Reported by: dpollard Owned by:
Priority: minor Milestone: 2.1.4
Component: Infrastructure Keywords: unicode, ExtendedPathIndex
Cc:

Description

A large number of folders and Archetypes objects were created programmatically in Plone 2.1.3 on Zope 2.7.8 but could not be accessed because of a runtime ValueError, invalid literal for int()

The path of the object somehow has been created as a unicode object and ExtendedPathIndex expects a string or casts the object to int. Adding a test for a unicode object has solved the problem:

--- ExtendedPathIndex.py 2006-07-04 11:38:22.000000000 +0100 +++ ExtendedPathIndex.py.orig 2006-07-04 11:37:52.000000000 +0100 @@ -211,7 +211,7 @@

level < 0 not implemented yet """

  • if isinstance(path, str) or isinstance(path, unicode):

+ if isinstance(path, str):

startlevel = default_level

else:

startlevel = int(path[1])

Change History

comment:1 Changed 6 years ago by hannosch

  • Status changed from new to closed
  • Resolution set to fixed

(In [10191]) Relaxed a check for path only allowing strings so far. Now we except all basestrings. This closes #5617. Converted log infrastructure to use Python's logging module instead zLOG. Cleaned up HISTORY.txt.

comment:2 Changed 6 years ago by hannosch

  • Component changed from Unknown to Infrastructure

comment:3 Changed 5 years ago by hannosch

  • Milestone changed from 2.1.x to 2.1.4
Note: See TracTickets for help on using tickets.