comparison Python/errors.c @ 11899:723efcdcce1b legacy-trunk

Mark discovered a bug in his patch: he didn't *use* PyExc_WindowsError in PyErr_SetFromWindowsErrWithFilename() like he intended to... :-)
author Guido van Rossum <guido@python.org>
date Thu, 02 Mar 2000 13:55:01 +0000
parents 4080c7a0f1ed
children 3b8d9e63e4e1
comparison
equal deleted inserted replaced
11898:4679bcef7a4f 11899:723efcdcce1b
382 if (filename != NULL && Py_UseClassExceptionsFlag) 382 if (filename != NULL && Py_UseClassExceptionsFlag)
383 v = Py_BuildValue("(iss)", err, s, filename); 383 v = Py_BuildValue("(iss)", err, s, filename);
384 else 384 else
385 v = Py_BuildValue("(is)", err, s); 385 v = Py_BuildValue("(is)", err, s);
386 if (v != NULL) { 386 if (v != NULL) {
387 PyErr_SetObject(PyExc_EnvironmentError, v); 387 PyErr_SetObject(PyExc_WindowsError, v);
388 Py_DECREF(v); 388 Py_DECREF(v);
389 } 389 }
390 LocalFree(s); 390 LocalFree(s);
391 return NULL; 391 return NULL;
392 } 392 }