mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-02 12:01:17 +00:00
Py3: Use range from six.moves
This commit is contained in:
parent
a7abf8b731
commit
769e20f2a9
@ -3,6 +3,7 @@ from __future__ import absolute_import
|
|||||||
import itertools
|
import itertools
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from six.moves import range
|
||||||
import pyparsing as pp
|
import pyparsing as pp
|
||||||
|
|
||||||
from . import http, http2, websockets, writer, exceptions
|
from . import http, http2, websockets, writer, exceptions
|
||||||
@ -19,7 +20,7 @@ __all__ = [
|
|||||||
def expand(msg):
|
def expand(msg):
|
||||||
times = getattr(msg, "times", None)
|
times = getattr(msg, "times", None)
|
||||||
if times:
|
if times:
|
||||||
for j_ in xrange(int(times.value)):
|
for j_ in range(int(times.value)):
|
||||||
yield msg.strike_token("times")
|
yield msg.strike_token("times")
|
||||||
else:
|
else:
|
||||||
yield msg
|
yield msg
|
||||||
|
Loading…
Reference in New Issue
Block a user