[Zope-Checkins] CVS: Zope/lib/python/ZTUtils - Tree.py:1.16

Martijn Pieters mj@zope.com
Tue, 15 Jul 2003 13:02:02 -0400


Update of /cvs-repository/Zope/lib/python/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv21595/lib/python/ZTUtils

Modified Files:
	Tree.py 
Log Message:
Fix potential problem with step being an empty string (later on the code
refers to 'if len(step) == 0').


=== Zope/lib/python/ZTUtils/Tree.py 1.15 => 1.16 ===
--- Zope/lib/python/ZTUtils/Tree.py:1.15	Fri Apr 25 12:32:02 2003
+++ Zope/lib/python/ZTUtils/Tree.py	Tue Jul 15 13:01:56 2003
@@ -295,7 +295,7 @@
     if nth is not None:
         nth_pair = (None, None)
     for step in s.split(':'):
-        if step[0] == '_':
+        if step.startswith('_'):
             pop = len(step) - 1
             continue
         if pop < 0: