mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Merge pull request #1199 from dufferzafar/pathod-generator-hotfix
Handle the slice object case in TransformGenerator.__getitem__
This commit is contained in:
commit
b9ad7be5ac
@ -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