mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-11 01:41:57 -04:00
move ENOATTR definition to borg.platform.base
That also gets imported into borg.platform, so it is easily available from there.
This commit is contained in:
parent
42e645e6a2
commit
663732c8bd
2 changed files with 5 additions and 8 deletions
|
|
@ -24,7 +24,11 @@ API_VERSION = "1.2_05"
|
|||
fdatasync = getattr(os, "fdatasync", os.fsync)
|
||||
has_posix_fadvise = hasattr(os, "posix_fadvise")
|
||||
|
||||
from .xattr import ENOATTR
|
||||
try:
|
||||
ENOATTR = errno.ENOATTR # type: ignore[attr-defined]
|
||||
except AttributeError:
|
||||
# on some platforms, ENOATTR is missing, use ENODATA there
|
||||
ENOATTR = errno.ENODATA # type: ignore[attr-defined]
|
||||
|
||||
|
||||
def listxattr(path, *, follow_symlinks=False):
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ import os
|
|||
from ..helpers import Buffer
|
||||
|
||||
|
||||
try:
|
||||
ENOATTR = errno.ENOATTR # type: ignore[attr-defined]
|
||||
except AttributeError:
|
||||
# on some platforms, ENOATTR is missing, use ENODATA there
|
||||
ENOATTR = errno.ENODATA # type: ignore[attr-defined]
|
||||
|
||||
|
||||
buffer = Buffer(bytearray, limit=2**24)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue