Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix AlignedSegment's pack_tags()'s exceptions
There is no `array.typecode` class attribute, so the `array.array` arm produced an AttributeError instead of the intended ValueError. Perhaps `value.typecode` was intended; but this error only arises when a `value_type` has been specified, so the array's typecode has no influence on `typecode` anyway. So we simplify the message. Also add a similar check in the scalar arm of this if-else to avoid an invalid `typecode` here being reported as a raw KeyError. Fixes #1233. Closes #1235 -- hat tip @marcus1487 for issue analysis. [TODO] All this code is confusing and should be rewritten using HTSlib's more recent aux field manipulation APIs.
- Loading branch information