[Zope3-checkins] CVS: Zope3/src/zope/interface - pyskel.py:1.1.2.5

Guido van Rossum guido@python.org
Tue, 24 Dec 2002 11:54:44 -0500


Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv8400

Modified Files:
      Tag: NameGeddon-branch
	pyskel.py 
Log Message:
In resolve(), convert path entry to string before using.  In Python
2.3, sys.path entries *may* be non-string objects (see PEP 302).


=== Zope3/src/zope/interface/pyskel.py 1.1.2.4 => 1.1.2.5 ===
--- Zope3/src/zope/interface/pyskel.py:1.1.2.4	Tue Dec 24 07:51:27 2002
+++ Zope3/src/zope/interface/pyskel.py	Tue Dec 24 11:54:44 2002
@@ -118,6 +118,7 @@
         if not name.startswith('/'):
             cwd = os.getcwd()
             for path in sys.path[1:]: # Yeah, we need to exclude the cwd itself
+                path = str(path)
                 if path != '' and cwd.startswith(path):
                     name = os.path.join(cwd[len(path)+1:], name)
                     name = os.path.normpath(name)