[Python-checkins] python/dist/src/Lib/distutils util.py,1.69,1.70

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
2002年8月13日 10:42:59 -0700


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv20321/Lib/distutils
Modified Files:
	util.py 
Log Message:
SF bug #574235, convert_path fails with empty pathname
Index: util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/util.py,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** util.py	9 Aug 2002 16:37:34 -0000	1.69
--- util.py	13 Aug 2002 17:42:57 -0000	1.70
***************
*** 85,91 ****
 if os.sep == '/':
 return pathname
! if pathname and pathname[0] == '/':
 raise ValueError, "path '%s' cannot be absolute" % pathname
! if pathname and pathname[-1] == '/':
 raise ValueError, "path '%s' cannot end with '/'" % pathname
 
--- 85,93 ----
 if os.sep == '/':
 return pathname
! if not pathname:
! return pathname
! if pathname[0] == '/':
 raise ValueError, "path '%s' cannot be absolute" % pathname
! if pathname[-1] == '/':
 raise ValueError, "path '%s' cannot end with '/'" % pathname
 

AltStyle によって変換されたページ (->オリジナル) /