mercurial/osutil.c
changeset 31683 1ed57a7dd904
parent 31682 58d4622bc1ef
child 32398 dc51700be00c
--- a/mercurial/osutil.c	Sat Mar 25 17:24:11 2017 +0900
+++ b/mercurial/osutil.c	Sat Mar 25 17:25:23 2017 +0900
@@ -1106,7 +1106,7 @@
 	memset(&buf, 0, sizeof(buf));
 	r = statfs(path, &buf);
 	if (r != 0)
-		Py_RETURN_NONE;
+		return PyErr_SetFromErrno(PyExc_OSError);
 	return Py_BuildValue("s", describefstype(&buf));
 }
 #endif /* defined(HAVE_LINUX_STATFS) || defined(HAVE_BSD_STATFS) */