acl_get() and acl_set() should accept a fd. Related to #4403

Fixes:

self = <borg.archive.MetadataCollector object at 0x14ffb70b28d0>
st = os.stat_result(st_mode=16895, st_ino=246007, st_dev=65280, st_nlink=3, st_uid=100
0, st_gid=0, st_size=512, st_atime=1551123978, st_mtime=1551123979, st_ctime=155112397
9)
path = 'input', fd = 16

    def stat_ext_attrs(self, st, path, fd=None):
        attrs = {}
        bsdflags = 0
        with backup_io('extended stat'):
            if not self.nobsdflags:
                bsdflags = get_flags(path, st, fd=fd)
            xattrs = xattr.get_all(fd or path, follow_symlinks=False)
>           acl_get(path, attrs, st, self.numeric_owner, fd=fd)
E           TypeError: acl_get() got an unexpected keyword argument 'fd'

src/borg/archive.py:1023: TypeError
This commit is contained in:
Björn Ketelaars 2019-02-26 07:03:15 +01:00
parent 81f9a8ccde
commit c5e3f3b4d4
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ def setxattr(path, name, value, *, follow_symlinks=False):
""" """
def acl_get(path, item, st, numeric_owner=False): def acl_get(path, item, st, numeric_owner=False, fd=None):
""" """
Saves ACL Entries Saves ACL Entries
@ -69,7 +69,7 @@ def acl_get(path, item, st, numeric_owner=False):
""" """
def acl_set(path, item, numeric_owner=False): def acl_set(path, item, numeric_owner=False, fd=None):
""" """
Restore ACL Entries Restore ACL Entries