summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-04-11 07:04:06 (GMT)
committerGeorg Brandl <georg@python.org>2006-04-11 07:04:06 (GMT)
commit05e89b86d66cbd90b9c43ebe89f42dfcc6f558fe (patch)
treed957833408ebd1a22f4bf25872120ca5073be81c /Modules
parent377be11ee1fab015f4cc77975374f86cf436536e (diff)
downloadcpython-05e89b86d66cbd90b9c43ebe89f42dfcc6f558fe.zip
cpython-05e89b86d66cbd90b9c43ebe89f42dfcc6f558fe.tar.gz
cpython-05e89b86d66cbd90b9c43ebe89f42dfcc6f558fe.tar.bz2
Clear errno before calling opendir() and readdir().
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 39765b2..a0a8d9a 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1845,6 +1845,7 @@ posix_listdir(PyObject *self, PyObject *args)
struct dirent *ep;
int arg_is_unicode = 1;
+ errno = 0;
if (!PyArg_ParseTuple(args, "U:listdir", &v)) {
arg_is_unicode = 0;
PyErr_Clear();