[New-bugs-announce] [issue4038] py3k error in distutils file_copy exception handlers

Mark Hammond report at bugs.python.org
Sat Oct 4 02:55:56 CEST 2008

New submission from Mark Hammond <mhammond at users.sourceforge.net>:

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.

components: Distutils
files: file_util_exceptions.patch
keywords: needs review, patch, patch
messages: 74292
nosy: mhammond
priority: normal
severity: normal
status: open
title: py3k error in distutils file_copy exception handlers
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file11699/file_util_exceptions.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list