2179
2178
return file_kind_from_stat_mode(mode)
2180
2179
file_kind_from_stat_mode = file_kind_from_stat_mode_thunk
2187
2186
if getattr(e, 'errno', None) in (errno.ENOENT, errno.ENOTDIR):
2188
2187
raise errors.NoSuchFile(f)
2195
2191
def until_no_eintr(f, *a, **kw):
2196
2192
"""Run f(*a, **kw), retrying if an EINTR error occurs.