Przeglądaj źródła

Item: remove some decode= params

update_internal() makes sure they have the desired type already.
Thomas Waldmann 3 lat temu
rodzic
commit
8e58525fc6
1 zmienionych plików z 6 dodań i 6 usunięć
  1. 6 6
      src/borg/item.pyx

+ 6 - 6
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)