From 8e58525fc6d3eceae4d846a7be9e2eed20084580 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 29 May 2022 15:38:43 +0200 Subject: [PATCH] Item: remove some decode= params update_internal() makes sure they have the desired type already. --- src/borg/item.pyx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/borg/item.pyx b/src/borg/item.pyx index c44ce5428..0fabc0241 100644 --- a/src/borg/item.pyx +++ b/src/borg/item.pyx @@ -239,10 +239,10 @@ class Item(PropDict): user = PropDict._make_property('user', (str, type(None)), 'surrogate-escaped str or None') group = PropDict._make_property('group', (str, type(None)), 'surrogate-escaped str or None') - acl_access = PropDict._make_property('acl_access', bytes, decode=want_bytes) - acl_default = PropDict._make_property('acl_default', bytes, decode=want_bytes) - acl_extended = PropDict._make_property('acl_extended', bytes, decode=want_bytes) - acl_nfs4 = PropDict._make_property('acl_nfs4', bytes, decode=want_bytes) + acl_access = PropDict._make_property('acl_access', bytes) + acl_default = PropDict._make_property('acl_default', bytes) + acl_extended = PropDict._make_property('acl_extended', bytes) + acl_nfs4 = PropDict._make_property('acl_nfs4', bytes) mode = PropDict._make_property('mode', int) uid = PropDict._make_property('uid', int) @@ -258,7 +258,7 @@ class Item(PropDict): # size is only present for items with a chunk list and then it is sum(chunk_sizes) size = PropDict._make_property('size', int) - hlid = PropDict._make_property('hlid', bytes, decode=want_bytes) # hard link id: same value means same hard link. + hlid = PropDict._make_property('hlid', bytes) # hard link id: same value means same hard link. hardlink_master = PropDict._make_property('hardlink_master', bool) # legacy chunks = PropDict._make_property('chunks', (list, type(None)), 'list or None') @@ -482,7 +482,7 @@ class ArchiveItem(PropDict): chunker_params = PropDict._make_property('chunker_params', tuple) recreate_cmdline = PropDict._make_property('recreate_cmdline', list) # list of s-e-str # recreate_source_id, recreate_args, recreate_partial_chunks were used in 1.1.0b1 .. b2 - recreate_source_id = PropDict._make_property('recreate_source_id', bytes, decode=want_bytes) + recreate_source_id = PropDict._make_property('recreate_source_id', bytes) recreate_args = PropDict._make_property('recreate_args', list) # list of s-e-str recreate_partial_chunks = PropDict._make_property('recreate_partial_chunks', list) # list of tuples size = PropDict._make_property('size', int)