mirror of
https://github.com/borgbackup/borg.git
synced 2026-03-21 01:50:04 -04:00
add transaction_id assertion
an acd_cli (amazon cloud drive fuse filesystem) user had "borg init" crash in the line below. by adding the assertion we tell that we do not expect the transaction_id to be None there, so it is easier to differentiate from a random coding error.
This commit is contained in:
parent
316c0cd6f0
commit
7b5772df2d
1 changed files with 1 additions and 0 deletions
|
|
@ -248,6 +248,7 @@ class Repository:
|
|||
b'segments': self.segments,
|
||||
b'compact': list(self.compact)}
|
||||
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)
|
||||
with open(hints_file + '.tmp', 'wb') as fd:
|
||||
msgpack.pack(hints, fd)
|
||||
|
|
|
|||
Loading…
Reference in a new issue