mirror of
https://github.com/python/cpython.git
synced 2025-09-29 19:56:59 +00:00
Issue #11855: Apply missing formatting for urlretrieve
This commit is contained in:
parent
df453fbb5f
commit
ad72bb1aa8
1 changed files with 5 additions and 5 deletions
|
@ -167,15 +167,15 @@ High-level interface
|
||||||
the download is interrupted.
|
the download is interrupted.
|
||||||
|
|
||||||
The *Content-Length* is treated as a lower bound: if there's more data to read,
|
The *Content-Length* is treated as a lower bound: if there's more data to read,
|
||||||
urlretrieve reads more data, but if less data is available, it raises the
|
:func:`urlretrieve` reads more data, but if less data is available, it raises
|
||||||
exception.
|
the exception.
|
||||||
|
|
||||||
You can still retrieve the downloaded data in this case, it is stored in the
|
You can still retrieve the downloaded data in this case, it is stored in the
|
||||||
:attr:`content` attribute of the exception instance.
|
:attr:`content` attribute of the exception instance.
|
||||||
|
|
||||||
If no *Content-Length* header was supplied, urlretrieve can not check the size
|
If no *Content-Length* header was supplied, :func:`urlretrieve` can not check
|
||||||
of the data it has downloaded, and just returns it. In this case you just have
|
the size of the data it has downloaded, and just returns it. In this case you
|
||||||
to assume that the download was successful.
|
just have to assume that the download was successful.
|
||||||
|
|
||||||
|
|
||||||
.. data:: _urlopener
|
.. data:: _urlopener
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue