[Python-checkins] r45947 - in python/trunk: Modules/_csv.c Modules/_elementtree.c Modules/_ssl.c Objects/longobject.c

M.-A. Lemburg mal at egenix.com
Thu May 11 09:36:30 CEST 2006


Neal Norwitz wrote:
> On 5/10/06, Thomas Wouters <thomas at python.org> wrote:
>>
>>
>> On 5/10/06, neal.norwitz <python-checkins at python.org> wrote:
>> > Modified: python/trunk/Modules/_ssl.c
>> >
>> ==============================================================================
>>
>> > --- python/trunk/Modules/_ssl.c (original)
>> > +++ python/trunk/Modules/_ssl.c Wed May 10 08:57:58 2006
>> > @@ -183,9 +183,9 @@
>> >         int sockstate;
>> >
>> >         self = PyObject_New(PySSLObject, &PySSL_Type); /* Create new
>> object */
>> > -       if (self == NULL){
>> > -               errstr = "newPySSLObject error";
>> > -               goto fail;
>> > +       if (self == NULL) {
>> > +               PyErr_SetString(PySSLErrorObject,
>> "newPySSLObject error");
>> > +               return NULL;
>> >         }
>> >         memset(self->server, '\0', sizeof(char) * X509_NAME_MAXLEN);
>> >         memset(self->issuer, '\0', sizeof(char) * X509_NAME_MAXLEN);
>>
>>
>> Is there a reason this clobbers the exception set by PyObject_New()?
>> (Especially considering the useless error message the new exception
>> contains
>> :)
> 
> Good point.  I didn't even think about changing the code, I was just
> fixing the Coverity warnings.  I think MAL originally wrote this code.
> It doesn't seem like we should set the error here.  MAL?

This is not my code - I only remember that it was contributed
by some 3rd party.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 11 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-checkins mailing list