diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-15 20:59:24 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-15 20:59:24 (GMT) |
commit | 618c2e13ca410f342bb057e62e24478b585744aa (patch) | |
tree | c0a90d69c1ff1e06a2a3602f306e7717cdab3125 /Doc/library | |
parent | 18d105b824ce55afacf18a9e2a8fee6ea62b2e54 (diff) | |
download | cpython-618c2e13ca410f342bb057e62e24478b585744aa.zip cpython-618c2e13ca410f342bb057e62e24478b585744aa.tar.gz cpython-618c2e13ca410f342bb057e62e24478b585744aa.tar.bz2 |
Use OSError instead of os.error in the docs.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/os.path.rst | 8 | ||||
-rw-r--r-- | Doc/library/shutil.rst | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index aed9cf8..13bda9b 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -126,7 +126,7 @@ applications should use string objects to access all files. Return the time of last access of *path*. The return value is a number giving the number of seconds since the epoch (see the :mod:`time` module). Raise - :exc:`os.error` if the file does not exist or is inaccessible. + :exc:`OSError` if the file does not exist or is inaccessible. If :func:`os.stat_float_times` returns True, the result is a floating point number. @@ -136,7 +136,7 @@ applications should use string objects to access all files. Return the time of last modification of *path*. The return value is a number giving the number of seconds since the epoch (see the :mod:`time` module). - Raise :exc:`os.error` if the file does not exist or is inaccessible. + Raise :exc:`OSError` if the file does not exist or is inaccessible. If :func:`os.stat_float_times` returns True, the result is a floating point number. @@ -147,13 +147,13 @@ applications should use string objects to access all files. Return the system's ctime which, on some systems (like Unix) is the time of the last change, and, on others (like Windows), is the creation time for *path*. The return value is a number giving the number of seconds since the epoch (see - the :mod:`time` module). Raise :exc:`os.error` if the file does not exist or + the :mod:`time` module). Raise :exc:`OSError` if the file does not exist or is inaccessible. .. function:: getsize(path) - Return the size, in bytes, of *path*. Raise :exc:`os.error` if the file does + Return the size, in bytes, of *path*. Raise :exc:`OSError` if the file does not exist or is inaccessible. diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 080c923..e962112 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -372,7 +372,7 @@ provided by this module. :: else: copy2(srcname, dstname) # XXX What about devices, sockets etc.? - except (IOError, os.error) as why: + except OSError as why: errors.append((srcname, dstname, str(why))) # catch the Error from the recursive copytree so that we can # continue with other files |