Better error message for an assertion
In some unexpected situations BAT would just show that the `bfile_pp is not None` assertion failed. Now it also shows which file is the one causing this issue, aiding in debugging the situation.
This commit is contained in:
parent
2aaf0896ba
commit
0e5d926e7a
@ -475,7 +475,8 @@ class Packer:
|
||||
# It is *not* used for any disk I/O, since the file may not even
|
||||
# exist on the local filesystem.
|
||||
bfile_pp = action.new_path
|
||||
assert bfile_pp is not None
|
||||
assert bfile_pp is not None, \
|
||||
f"Action {action.path_action.name} on {bfile_path} has no final path set, unable to process"
|
||||
|
||||
# Use tempfile to create a unique name in our temporary directoy.
|
||||
# The file should be deleted when self.close() is called, and not
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user