[New-bugs-announce] [issue7512] shutil.copystat may fail EOPNOTSUPP

Kuang-che Wu report at bugs.python.org
Tue Dec 15 08:33:13 CET 2009


New submission from Kuang-che Wu <kcwu at csie.org>:

"flags" is only supported on certain OS. FreeBSD is one of them.
FreeBSD itself support chflags but not all of its file systems do.

On FreeBSD, copystat() will fail on zfs. The exception is OSError and
errno is EOPNOTSUPP. According to manpage chflags(2), the errno means
"The underlying file system does not support file flags"

If the file system doesn't support flags, we should not call
os.chflags() at first or should not raise exception.

In my patch, I just ignore EOPNOTSUPP exception.

----------
components: Library (Lib)
files: copystat.diff
keywords: patch
messages: 96427
nosy: kcwu
severity: normal
status: open
title: shutil.copystat may fail EOPNOTSUPP
type: behavior
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15564/copystat.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7512>
_______________________________________


More information about the New-bugs-announce mailing list