mirror of
https://github.com/python/cpython.git
synced 2025-11-14 07:49:28 +00:00
Use OSError instead of os.error in the docs.
This commit is contained in:
parent
18d105b824
commit
618c2e13ca
2 changed files with 5 additions and 5 deletions
|
|
@ -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
|
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
|
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
|
If :func:`os.stat_float_times` returns True, the result is a floating point
|
||||||
number.
|
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
|
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).
|
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
|
If :func:`os.stat_float_times` returns True, the result is a floating point
|
||||||
number.
|
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
|
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*.
|
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 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.
|
is inaccessible.
|
||||||
|
|
||||||
|
|
||||||
.. function:: getsize(path)
|
.. 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.
|
not exist or is inaccessible.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ provided by this module. ::
|
||||||
else:
|
else:
|
||||||
copy2(srcname, dstname)
|
copy2(srcname, dstname)
|
||||||
# XXX What about devices, sockets etc.?
|
# XXX What about devices, sockets etc.?
|
||||||
except (IOError, os.error) as why:
|
except OSError as why:
|
||||||
errors.append((srcname, dstname, str(why)))
|
errors.append((srcname, dstname, str(why)))
|
||||||
# catch the Error from the recursive copytree so that we can
|
# catch the Error from the recursive copytree so that we can
|
||||||
# continue with other files
|
# continue with other files
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue