Re: Exception difference 2.4 ==> 2.5

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • D'Arcy J.M. Cain

    Re: Exception difference 2.4 ==> 2.5

    On Wed, 19 Nov 2008 17:08:13 -0500
    Terry Reedy <tjreedy@udel.e duwrote:
    am running Python 2.5.2. I was able to reduce the program to a
    reasonably small version that exhibits the problem. It is in two files
    in ftp://ftp.druid.net/pub/distrib/Test_2.5.tgz including Fredrik
    Lundh's simple XML-RPC server. Just run the test program under 2.4,
    2.5 and 2.6 to see the difference.
    >
    Report it on the bugs.python.org and it might possibly get fixed.
    OK but I still don't think that I have even zeroed in on the bug. Even
    the code I provided is pretty large and complex for a snippet meant to
    identify the problem.

    I managed to move everything into one test file and switched to the
    SimpleXMLRPCSer ver module but to no avail. The new code is at
    ftp://ftp.druid.net/pub/distrib/test_2.5

    --
    D'Arcy J.M. Cain <darcy@druid.ne t | Democracy is three wolves
    http://www.druid.net/darcy/ | and a sheep voting on
    +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
  • Ross Ridge

    #2
    Re: Exception difference 2.4 ==&gt; 2.5

    D'Arcy J.M. Cain <darcy@druid.ne twrote:
    >I managed to move everything into one test file and switched to the
    >SimpleXMLRPCSe rver module but to no avail. The new code is at
    >ftp://ftp.druid.net/pub/distrib/test_2.5
    It seems be this issue:



    Your handler in the server thread correctly catches the RuntimeExceptio n
    and converts into a Fault object which it returns. Unfortunately,
    xmlrpclib then throws an exception instead of marshalling the Fault
    object. Your server catches the exception and turns it into a 500
    HTTP server error. The client thread then throws a ProtocolError,
    which is uncaught.

    So exceptions are working fine in your test case, the problem is that
    xmlrpclib.dumps () can't marshall xmlrpclib.Fault objects in 2.5.

    Ross Ridge

    --
    l/ // Ross Ridge -- The Great HTMU
    [oo][oo] rridge@csclub.u waterloo.ca
    -()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
    db //

    Comment

    Working...