mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2024-11-28 20:51:44 +00:00
Added exception when base index out of range in a normal (non-indexed) segment
* matches what happens in indexed segments
This commit is contained in:
parent
2edfc1786c
commit
e9640269f9
@ -258,6 +258,8 @@ class DefaultSegment(object):
|
||||
index = r.get_reverse_index(base_index)
|
||||
else:
|
||||
index = base_index - r.get_raw_index(0)
|
||||
if not self.is_valid_index(index):
|
||||
raise IndexError("index %d not in this segment" % base_index)
|
||||
return index
|
||||
|
||||
def tostring(self):
|
||||
|
Loading…
Reference in New Issue
Block a user