]> granicus.if.org Git - python/commitdiff
#6079: use 3k except syntax in examples.
authorGeorg Brandl <georg@python.org>
Fri, 22 May 2009 16:44:06 +0000 (16:44 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 22 May 2009 16:44:06 +0000 (16:44 +0000)
Doc/library/xmlrpc.client.rst

index 69cf4b572f128dcba0e13add7b0b667332eb65f0..16014308b9e5d8b87e3cb3091a546d998ba819a3 100644 (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)