summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/file_util.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-08-29 04:07:35 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2014-08-29 04:07:35 (GMT)
commit6685883c02b29b66813343e6380133cd49df4300 (patch)
tree7ed937d704da06e0cb359c2d8e18d18ae0322d5c /Lib/distutils/file_util.py
parent59e0802301e907873e392e0b25917fd0007a6252 (diff)
downloadcpython-6685883c02b29b66813343e6380133cd49df4300.zip
cpython-6685883c02b29b66813343e6380133cd49df4300.tar.gz
cpython-6685883c02b29b66813343e6380133cd49df4300.tar.bz2
Issue #22182: Use e.args to unpack exceptions correctly in distutils.file_util.move_file.
Patch by Claudiu Popa.
Diffstat (limited to 'Lib/distutils/file_util.py')
-rw-r--r--Lib/distutils/file_util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/distutils/file_util.py b/Lib/distutils/file_util.py
index f6ed290..7b14efb 100644
--- a/Lib/distutils/file_util.py
+++ b/Lib/distutils/file_util.py
@@ -194,7 +194,7 @@ def move_file (src, dst,
try:
os.rename(src, dst)
except OSError as e:
- (num, msg) = e
+ (num, msg) = e.args
if num == errno.EXDEV:
copy_it = True
else:
@@ -206,7 +206,7 @@ def move_file (src, dst,
try:
os.unlink(src)
except OSError as e:
- (num, msg) = e
+ (num, msg) = e.args
try:
os.unlink(dst)
except OSError: