[ZCM] [ZC] 2352/ 4 Resolve "UnboundLocalError with OFS.Traversable.unrestrictedTraverse('+something')"

"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Sat, 15 Sep 2007 06:55:31 -0400
Newsgroups gmane.comp.web.zope.devel.collector-monitor
Message-ID <[email protected]>
Issue #2352 Update (Resolve) "UnboundLocalError with OFS.Traversable.unrestrictedTraverse('+something')"
 Status Resolved, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2352

==============================================================
= Resolve - Entry #4 by ajung on Sep 15, 2007 6:55 am

 Status: Pending => Resolved

Patch applied to 2.10 branch and trunk
________________________________________
= Comment - Entry #3 by ldr on Sep 1, 2007 9:55 am


Uploaded:  "Traversable2.diff"
 - http://www.zope.org/Collectors/Zope/2352/Traversable2.diff/view
Patch now contains a test for the issue.
________________________________________
= Assign - Entry #2 by ajung on Sep 1, 2007 10:40 am

Is this patch covered by tests?
________________________________________
= Request - Entry #1 by ldr on Aug 31, 2007 10:55 am


Uploaded:  "Traversable.diff"
 - http://www.zope.org/Collectors/Zope/2352/Traversable.diff/view
There is an unhandled path in the unrestrictedTraverse logic when a name[:1] is in '@+' but name is not a namespace. eg. when name is '+something'. The following patch checks that the name is actually a name space.

Test case: ob.unrestrtictedTraverse('+something') raises UnboundLocalError: local variable 'next' referenced before assignment
==============================================================