Mark discovered a bug in his patch: he didn't *use* PyExc_WindowsError
in PyErr_SetFromWindowsErrWithFilename() like he intended to... :-)
diff --git a/Python/errors.c b/Python/errors.c
index b3e1910..ebce5dd 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -384,7 +384,7 @@
 	else
 		v = Py_BuildValue("(is)", err, s);
 	if (v != NULL) {
-		PyErr_SetObject(PyExc_EnvironmentError, v);
+		PyErr_SetObject(PyExc_WindowsError, v);
 		Py_DECREF(v);
 	}
 	LocalFree(s);