Mercurial > hg-stable
diff mercurial/osutil.c @ 31683:1ed57a7dd904
statfs: make getfstype() raise OSError
It's better for getfstype() function to not suppress an error. Callers can
handle it as necessary. Now "hg debugfsinfo" will report OSError.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 25 Mar 2017 17:25:23 +0900 |
parents | 58d4622bc1ef |
children | dc51700be00c |
line wrap: on
line diff
--- 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) */