]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use OSError instead of os.error in the docs.
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Sat, 15 Dec 2012 20:59:24 +0000 (22:59 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Sat, 15 Dec 2012 20:59:24 +0000 (22:59 +0200)
Doc/library/os.path.rst
Doc/library/shutil.rst

index aed9cf8c68b32b32023f7a212f21fbe0bf114829..13bda9b2b527b47382aefe509a3059c4d7729509 100644 (file)
@@ -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.
 
 
index 080c9233a9abbd9f820ab0c04635a987ffaef6f1..e9621120a9fa6829c4caee4052c030a00a46e587 100644 (file)
@@ -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