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

Thomas Wouters thomas at python.org
Wed May 10 10:14:49 CEST 2006


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
:)

-- 
Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-checkins/attachments/20060510/7ac6da55/attachment.html 


More information about the Python-checkins mailing list