summaryrefslogtreecommitdiffstats
path: root/Doc/library/shutil.rst
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-19 12:33:35 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-19 12:33:35 (GMT)
commit2606a6f197a49f04611cb5cb0d67404d1ab14481 (patch)
tree35c228625105050ec2f593e6b362ce9e2498c760 /Doc/library/shutil.rst
parent8a045cb93bded97220422a957941bb68341429d1 (diff)
downloadcpython-2606a6f197a49f04611cb5cb0d67404d1ab14481.zip
cpython-2606a6f197a49f04611cb5cb0d67404d1ab14481.tar.gz
cpython-2606a6f197a49f04611cb5cb0d67404d1ab14481.tar.bz2
Issue #16719: Get rid of WindowsError. Use OSError instead
Patch by Serhiy Storchaka.
Diffstat (limited to 'Doc/library/shutil.rst')
-rw-r--r--Doc/library/shutil.rst7
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index 5d3f881..34d8a63 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -393,11 +393,10 @@ provided by this module. ::
errors.extend(err.args[0])
try:
copystat(src, dst)
- except WindowsError:
- # can't copy file access times on Windows
- pass
except OSError as why:
- errors.extend((src, dst, str(why)))
+ # can't copy file access times on Windows
+ if why.winerror is None:
+ errors.extend((src, dst, str(why)))
if errors:
raise Error(errors)