Fix crash when range filtering

Regression from 25cfe9 (timeline: make log level calculation a lot faster).
This commit is contained in:
René Stadler 2012-09-22 01:25:22 +02:00 committed by Stefan Sauer
parent ca6aee7388
commit bf28e9464e

View file

@ -404,6 +404,15 @@ class SubRange (object):
def __getitem__ (self, i):
if isinstance (i, slice):
stop = i.stop
if stop >= 0:
stop += self.start
else:
stop += self.stop
return self.l[i.start + self.start:stop]
else:
return self.l[i + self.start]
def __len__ (self):