mirror of
https://github.com/python/cpython.git
synced 2025-09-18 14:40:43 +00:00
#7802: fix invalid example (heh).
This commit is contained in:
parent
91d26b43c9
commit
53ffca5afb
1 changed files with 3 additions and 3 deletions
|
@ -414,12 +414,12 @@ does not exist). It has the following members:
|
|||
error.
|
||||
|
||||
In the following example we're going to intentionally cause a :exc:`ProtocolError`
|
||||
by providing an invalid URI::
|
||||
by providing an URI that doesn't point to an XMLRPC server::
|
||||
|
||||
import xmlrpclib
|
||||
|
||||
# create a ServerProxy with an invalid URI
|
||||
proxy = xmlrpclib.ServerProxy("http://invalidaddress/")
|
||||
# create a ServerProxy with an URI that doesn't respond to XMLRPC requests
|
||||
proxy = xmlrpclib.ServerProxy("http://www.google.com/")
|
||||
|
||||
try:
|
||||
proxy.some_method()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue