[Python-bugs-list] [ python-Bugs-555404 ] bug in utils.py (not allow "" pathname)

noreply@sourceforge.net noreply@sourceforge.net
Wed, 15 May 2002 13:52:02 -0700


Bugs item #555404, was opened at 2002-05-13 08:20
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=555404&group_id=5470

Category: Distutils
Group: Python 2.2.1 candidate
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Evgeny Cherkashin (eugeneai)
Assigned to: Nobody/Anonymous (nobody)
>Summary: bug in utils.py (not allow "" pathname)

Initial Comment:
According to documentation : "If You want to place a
data file in Python root directory You should use "" as
a path name". But in this case exception raised due to
check pathname[0]=='/'

Just add a line marked by "+".

in convert_path method

     if os.sep == '/':
         return pathname
+    if pathname == '': return
     if pathname[0] == '/':
         raise ValueError, "path '%s' cannot be
absolute" % pathname
     if pathname[-1] == '/':
         raise ValueError, "path '%s' cannot end with
'/'" % pathname


----------------------------------------------------------------------

>Comment By: A.M. Kuchling (akuchling)
Date: 2002-05-15 16:52

Message:
Logged In: YES 
user_id=11375

Fixed in rev. 1.67 of distutils/util.py.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=555404&group_id=5470