[Python-checkins] cpython (merge 3.3 -> default): Merge: use OSError instead of os.error in the docs.

andrew.svetlov python-checkins at python.org
Sat Dec 15 22:00:06 CET 2012


http://hg.python.org/cpython/rev/cd75923a102a
changeset:   80871:cd75923a102a
parent:      80869:3829339ee675
parent:      80870:f05c0087c47d
user:        Andrew Svetlov <andrew.svetlov at gmail.com>
date:        Sat Dec 15 22:59:55 2012 +0200
summary:
  Merge: use OSError instead of os.error in the docs.

files:
  Doc/library/os.path.rst |  8 ++++----
  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
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -125,7 +125,7 @@
 
    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.
@@ -135,7 +135,7 @@
 
    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.
@@ -146,13 +146,13 @@
    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
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -385,7 +385,7 @@
                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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list