Dan Koch <koc...@ornl.gov> added the comment:

Here's the session printout. Desktop files under Vista still get deleted 
despite the exception. Does not occur on Fedora 12 or Mac OS X. I can code 
around it by testing for a blank filepath, but it was a surprise.

C:\Users\ko5>python
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, shutil, user
>>> desktop_dir = os.path.join(user.home, 'Desktop')
>>> os.chdir(desktop_dir)
>>> os.getcwd()
'C:\\Users\\ko5\\Desktop'
>>> shutil.rmtree('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\shutil.py", line 225, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Python26\lib\shutil.py", line 223, in rmtree
    os.rmdir(path)
WindowsError: [Error 3] The system cannot find the path specified: ''
>>>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to