Bugs item #1739115, was opened at 2007-06-18 14:41 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1739115&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Bj�rn Lindqvist (sonderblade) Assigned to: Nobody/Anonymous (nobody) Summary: shutil.rmtree's error message is confusing Initial Comment: If you run shutil.rmtree(something) on Windows where something is file and not a directory, you get the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python25\Lib\shutil.py", line 161, in rmtree onerror(os.listdir, path, sys.exc_info()) File "C:\Python25\Lib\shutil.py", line 159, in rmtree names = os.listdir(path) WindowsError: [Error 22] The directory name is invalid: 'foobar/*.*' The error message is pretty confusing and it shouldn't be to hard to fix it. Plus, if it shouldn't be possible to remove files with shutil.rmtree(), then the docs should say so. ---------------------------------------------------------------------- >Comment By: Georg Brandl (gbrandl) Date: 2007-06-19 12:38 Message: Logged In: YES user_id=849994 Originator: NO Updated the docs in rev. 56040, 56041 (2.5). IMO the error message is clear enough now if you read the docs. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1739115&group_id=5470
_______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com