diff options
author | Georg Brandl <georg@python.org> | 2009-05-22 16:44:06 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-05-22 16:44:06 (GMT) |
commit | 0dedf451428c174db89963a74e6c230420c811e4 (patch) | |
tree | 709e05da4d6549e42327f1b2ded66a679aee4475 /Doc | |
parent | fe5f4098acfe3c95fe6489b747a398cba46e734f (diff) | |
download | cpython-0dedf451428c174db89963a74e6c230420c811e4.zip cpython-0dedf451428c174db89963a74e6c230420c811e4.tar.gz cpython-0dedf451428c174db89963a74e6c230420c811e4.tar.bz2 |
#6079: use 3k except syntax in examples.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/xmlrpc.client.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/xmlrpc.client.rst b/Doc/library/xmlrpc.client.rst index 69cf4b5..1601430 100644 --- a/Doc/library/xmlrpc.client.rst +++ b/Doc/library/xmlrpc.client.rst @@ -343,7 +343,7 @@ The client code for the preceding server:: proxy = xmlrpc.client.ServerProxy("http://localhost:8000/") try: proxy.add(2, 5) - except xmlrpc.client.Fault, err: + except xmlrpc.client.Fault as err: print("A fault occurred") print("Fault code: %d" % err.faultCode) print("Fault string: %s" % err.faultString) @@ -390,7 +390,7 @@ by providing an invalid URI:: try: proxy.some_method() - except xmlrpc.client.ProtocolError, err: + except xmlrpc.client.ProtocolError as err: print("A protocol error occurred") print("URL: %s" % err.url) print("HTTP/HTTPS headers: %s" % err.headers) |