mirror of
https://github.com/borgbackup/borg.git
synced 2026-03-21 18:10:19 -04:00
Avoid using msgpack.packb at import time.
move item_keys = ... to __init__ (self.item_keys = ...) Solution from/discussed with TW.
This commit is contained in:
parent
f48a5ae6a7
commit
e6911b2f25
1 changed files with 1 additions and 2 deletions
|
|
@ -605,10 +605,9 @@ ITEM_KEYS = set([b'path', b'source', b'rdev', b'chunks',
|
|||
class RobustUnpacker:
|
||||
"""A restartable/robust version of the streaming msgpack unpacker
|
||||
"""
|
||||
item_keys = [msgpack.packb(name) for name in ITEM_KEYS]
|
||||
|
||||
def __init__(self, validator):
|
||||
super().__init__()
|
||||
self.item_keys = [msgpack.packb(name) for name in ITEM_KEYS]
|
||||
self.validator = validator
|
||||
self._buffered_data = []
|
||||
self._resync = False
|
||||
|
|
|
|||
Loading…
Reference in a new issue