[Python-checkins] python/dist/src/Lib shutil.py,1.31,1.32
jlgijsbers at users.sourceforge.net
jlgijsbers at users.sourceforge.net
Sat Aug 14 16:51:04 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25609
Modified Files:
shutil.py
Log Message:
Catch OSError raised when src or dst argument to os.path.samefile doesn't
exist.
Index: shutil.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/shutil.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** shutil.py 14 Aug 2004 13:30:01 -0000 1.31
--- shutil.py 14 Aug 2004 14:51:01 -0000 1.32
***************
*** 28,32 ****
# Macintosh, Unix.
if hasattr(os.path,'samefile'):
! return os.path.samefile(src, dst)
# All other platforms: check for same pathname.
--- 28,35 ----
# Macintosh, Unix.
if hasattr(os.path,'samefile'):
! try:
! return os.path.samefile(src, dst)
! except OSError:
! return False
# All other platforms: check for same pathname.
More information about the Python-checkins
mailing list