[Fedora-suds-list] Contribute to ticket 316

Daniel Rodriguez danjrod at gmail.com
Tue Sep 21 17:38:48 UTC 2010


Hi Paolo,

You may also supply an empty file descriptor by using StringIO (or
cStringIO) which I also did, besides using the same trick after creating the
ticket.

I haven't moved to 0.4, in spite of the good plug-in API, because my suds
0.3.9 is patched to solve that specific problem and other small issues I
found along the way.

Luckily the functionality provided by suds is vast in comparison with the
small extra tweaks that one may happen to need.

Best regards

Daniel

On Tue, Sep 21, 2010 at 17:11, Paolo Mossino <paolo.mossino at gmail.com>wrote:

> Hello,
>
>    my name is Paolo Mossino, using SUDS, I discover a problem in method
> failed of suds/client.py file.
>
> It seems to be the same problem as reported by ticket 316 (
> https://fedorahosted.org/suds/ticket/316).
>
> Sorry to disturb here, but I was unable to add my contributes via online
> ticketing system.
> The link for creating a new ticket (link
> https://fedorahosted.org/suds/newticket) fails since I've not enouth
> permissions ("*TICKET_CREATE privileges are required to perform this
> operation*"). I also try to create a Fedora account, but I'm not able to
> found a way to submit a bug to SUDS from the fedoraproject.org web
> interface.
>
> I want to contribute to this ticket by adding a use cases for the bug and
> proposing a patch.
>
> I discover this bug trying to connect to a WSDL protected by basic HTTP
> authentication, but providing wrong credentials.
>
> As reported by ticket 316, the bug is at the beginning of method failed
> (comments pruned, problem in *bold*):
>
> def failed(self, binding, error):
>>     status, reason = (error.httpcode, tostr(error))
>> *    reply = error.fp.read()*
>>
>
> The code try to read from error.fp without checking if it's None.
> If I understand correctly, this information is mainly used for providing
> information to the exception raised... this means that we can simply and
> safely provide a default (empty?) value if fp is None.
>
> My patch proposal is simple:
>
> - reply = error.fp.read()
> + if error.fp is None:
> +     reply = ''
> + else:
> +     reply = error.fp.read()
>
>
> Thank you in advance and Kind Regards,
>
> --
> Dr. Paolo Mossino  <paolo.mossino at gmail.com>
>
> _______________________________________________
> suds mailing list
> suds at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/suds
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/suds/attachments/20100921/05092a2d/attachment.html 


More information about the suds mailing list