mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Handle the slice object case in TransformGenerator.__getitem__
This commit is contained in:
parent
66ec1940ac
commit
8e60a9bca9
@ -37,6 +37,8 @@ class TransformGenerator(object):
|
||||
|
||||
def __getitem__(self, x):
|
||||
d = self.gen.__getitem__(x)
|
||||
if isinstance(x, slice):
|
||||
return self.transform(x.start, d)
|
||||
return self.transform(x, d)
|
||||
|
||||
def __repr__(self):
|
||||
|
Loading…
Reference in New Issue
Block a user