1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 01:37:20 +00:00

Item: remove some decode= params

update_internal() makes sure they have the desired type already.
This commit is contained in:
Thomas Waldmann 2022-05-29 15:38:43 +02:00
parent 655c1b9cc2
commit 8e58525fc6

View file

@ -239,10 +239,10 @@ class Item(PropDict):
user = PropDict._make_property('user', (str, type(None)), 'surrogate-escaped str or None') 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') 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_access = PropDict._make_property('acl_access', bytes)
acl_default = PropDict._make_property('acl_default', bytes, decode=want_bytes) acl_default = PropDict._make_property('acl_default', bytes)
acl_extended = PropDict._make_property('acl_extended', bytes, decode=want_bytes) acl_extended = PropDict._make_property('acl_extended', bytes)
acl_nfs4 = PropDict._make_property('acl_nfs4', bytes, decode=want_bytes) acl_nfs4 = PropDict._make_property('acl_nfs4', bytes)
mode = PropDict._make_property('mode', int) mode = PropDict._make_property('mode', int)
uid = PropDict._make_property('uid', 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 is only present for items with a chunk list and then it is sum(chunk_sizes)
size = PropDict._make_property('size', int) 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 hardlink_master = PropDict._make_property('hardlink_master', bool) # legacy
chunks = PropDict._make_property('chunks', (list, type(None)), 'list or None') 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) chunker_params = PropDict._make_property('chunker_params', tuple)
recreate_cmdline = PropDict._make_property('recreate_cmdline', list) # list of s-e-str 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, 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_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 recreate_partial_chunks = PropDict._make_property('recreate_partial_chunks', list) # list of tuples
size = PropDict._make_property('size', int) size = PropDict._make_property('size', int)