1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-23 14:41:43 +00:00

Merge pull request #1460 from ThomasWaldmann/fix-init

add transaction_id assertion
This commit is contained in:
enkore 2016-08-10 14:29:46 +02:00 committed by GitHub
commit a951d23d27

View file

@ -248,6 +248,7 @@ def write_index(self):
b'segments': self.segments, b'segments': self.segments,
b'compact': list(self.compact)} b'compact': list(self.compact)}
transaction_id = self.io.get_segments_transaction_id() transaction_id = self.io.get_segments_transaction_id()
assert transaction_id is not None
hints_file = os.path.join(self.path, 'hints.%d' % transaction_id) hints_file = os.path.join(self.path, 'hints.%d' % transaction_id)
with open(hints_file + '.tmp', 'wb') as fd: with open(hints_file + '.tmp', 'wb') as fd:
msgpack.pack(hints, fd) msgpack.pack(hints, fd)