#6079: use 3k except syntax in examples.

This commit is contained in:
Georg Brandl 2009-05-22 16:44:06 +00:00
parent fe5f4098ac
commit 0dedf45142
1 changed files with 2 additions and 2 deletions

View File

@ -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)