Fix TypeError in _capture_transfer_failure - #16
Merged
liam-lloyd merged 1 commit intoFeb 20, 2026
Merged
Conversation
Member
Author
|
The linting error can be ignored, it exists on upstream |
liam-lloyd
force-pushed
the
issue-1784_fix_is_package_creation_error_handling
branch
2 times, most recently
from
February 20, 2026 18:10
ec395f3 to
92ec92f
Compare
Currently, _capture_transfer_failure makes a call to `isinstance` with three arguments. `isinstance` takes only two arguments, so this results in a TypeError. This commit updates the `isinstance` call to instead use a tuple to pass multiple classes. It also adds unit tests for _capture_transfer_failure.
liam-lloyd
force-pushed
the
issue-1784_fix_is_package_creation_error_handling
branch
from
February 20, 2026 18:12
92ec92f to
3984e02
Compare
Member
|
I take it this is an upstream bug that you are fixing here in order to contribute back? |
Member
Author
Yes (it is affecting us; in the rare cases where Archivematica processing fails this is hiding the cause of the failure from us) |
cecilia-donnelly
approved these changes
Feb 20, 2026
cecilia-donnelly
left a comment
Member
There was a problem hiding this comment.
I haven't tested but it looks reasonable!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, _capture_transfer_failure makes a call to
isinstancewith three arguments.isinstancetakes only two arguments, so this results in a TypeError. This commit updates theisinstancecall to instead use a tuple to pass multiple classes.