classification
Title: py3k error in distutils file_copy exception handlers
Type: behavior Stage:
Components: Distutils Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mhammond Nosy List: loewis, mhammond
Priority: normal Keywords: patch

Created on 2008-10-04 00:55 by mhammond, last changed 2008-10-05 09:01 by mhammond. This issue is now closed.

Files
File name Uploaded Description Edit
file_util_exceptions.patch mhammond, 2008-10-04 00:55 fix exception handlers in file_util
Messages (3)
msg74292 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2008-10-04 00:55
All the exception handlers i dustutils.file_utils._copy_file_contents()
are of the form:

|except os.error as e:
|    (errno, errstr) = e

This fails to unpack the exception in py3k.  I'm attaching a patch that
uses exception attributes rather than unpacking e.args.  FWIW, one of
these exceptions in particular is likely to get hit on Windows if the
destination file is in use, as Windows can't replace such files.  This
isn't a huge problem in practice as it only hits when an error occurs.
msg74306 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-10-04 08:21
Looks fine to me, please apply.
msg74337 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2008-10-05 09:01
r66806 on the py3k branch.
History
Date User Action Args
2008-10-05 09:01:49mhammondsetstatus: open -> closed
assignee: mhammond
messages: + msg74337
resolution: accepted -> fixed
keywords: patch, patch
2008-10-04 08:21:30loewissetkeywords: - needs review
resolution: accepted
messages: + msg74306
nosy: + loewis
2008-10-04 00:55:55mhammondcreate