Changeset 85bba36 for fedd/federation


Ignore:
Timestamp:
May 18, 2010 8:53:55 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
d743d60
Parents:
139e2e2
Message:

Another error case - unsupported methods - handled better.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/remote_service.py

    r139e2e2 r85bba36  
    490490                        "Bad format message (XMLRPC??): %s" % e)
    491491            except FaultException, e:
    492                 ee = self.unpack_soap(e.fault.detail[0]).get('FeddFaultBody',
    493                         { })
     492                # If the method isn't implemented we get a FaultException
     493                # without a detail (which would be a FeddFault).  If that's the
     494                # case construct a service_error out of the SOAP fields of the
     495                # fault, if they're present.
     496                if e.fault.detail:
     497                    det = e.fault.detail[0]
     498                    ee = self.unpack_soap(det).get('FeddFaultBody', { })
     499                else:
     500                    ee = { 'code': service_error.internal,
     501                            'desc': e.fault.string or "Something Weird" }
    494502                if ee:
    495503                    raise service_error(ee['code'], ee['desc'])
Note: See TracChangeset for help on using the changeset viewer.