Issue 22182: distutils.file_util.move_file unpacks wrongly an exception (original ) (raw ) Issue22182
Created on 2014-08-11 12:38 by Claudiu.Popa , last changed 2022-04-11 14:58 by admin . This issue is now closed .
Messages (5)
msg225184 - (view)
Author: PCManticore (Claudiu.Popa) *
Date: 2014-08-11 12:38
Hi. When os.rename fails inside distutils.file_util.move_file, the exception is unpacked using ``(num, msg) = e``. While this was valid in Python 2, in Python 3 it should be ``e.args``. The attached patched fixes this.
msg225185 - (view)
Author: PCManticore (Claudiu.Popa) *
Date: 2014-08-11 12:45
Mm, it seems there's another instance of unpacking later on, when os.unlink fails. Here's the updated patch.
msg225894 - (view)
Author: Berker Peksag (berker.peksag) *
Date: 2014-08-25 20:21
LGTM. The second test should be named different, but I will fix it myself. Thanks for the patch!
msg226049 - (view)
Author: Roundup Robot (python-dev)
Date: 2014-08-29 04:08
New changeset a3452677a386 by Berker Peksag in branch '3.4': Issue #22182 : Use e.args to unpack exceptions correctly in distutils.file_util.move_file. http://hg.python.org/cpython/rev/a3452677a386 New changeset f01413758114 by Berker Peksag in branch 'default': Issue #22182 : Use e.args to unpack exceptions correctly in distutils.file_util.move_file. http://hg.python.org/cpython/rev/f01413758114
msg226050 - (view)
Author: Berker Peksag (berker.peksag) *
Date: 2014-08-29 04:10
Thanks Claudiu.
History
Date
User
Action
Args
2022-04-11 14:58:06
admin
set
github: 66378
2014-08-29 04:10:21
berker.peksag
set
status: open -> closedresolution: fixedmessages: + stage: commit review -> resolved
2014-08-29 04:08:54
python-dev
set
nosy: + python-dev messages: +
2014-08-25 20:21:19
berker.peksag
set
versions: + Python 3.4nosy: + berker.peksag messages: + assignee: berker.peksag stage: patch review -> commit review
2014-08-25 09:00:34
Claudiu.Popa
set
stage: patch review
2014-08-11 12:45:29
Claudiu.Popa
set
files: + issue22182.patch messages: +
2014-08-11 12:38:56
Claudiu.Popa
create