mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
Optimized list appending
This commit is contained in:
parent
82245298f4
commit
e9006ae199
@ -1386,7 +1386,7 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
|
|
||||||
def helptext(self):
|
def helptext(self):
|
||||||
text = []
|
text = []
|
||||||
text.extend([("head", "Global keys:\n")])
|
text.append(("head", "Global keys:\n"))
|
||||||
keys = [
|
keys = [
|
||||||
("A", "accept all intercepted connections"),
|
("A", "accept all intercepted connections"),
|
||||||
("a", "accept this intercepted connection"),
|
("a", "accept this intercepted connection"),
|
||||||
@ -1443,7 +1443,7 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
]
|
]
|
||||||
text.extend(format_keyvals(keys, key="key", val="text", indent=4))
|
text.extend(format_keyvals(keys, key="key", val="text", indent=4))
|
||||||
|
|
||||||
text.extend([("head", "\n\nConnection list keys:\n")])
|
text.append(("head", "\n\nConnection list keys:\n"))
|
||||||
keys = [
|
keys = [
|
||||||
("C", "clear connection list or eventlog"),
|
("C", "clear connection list or eventlog"),
|
||||||
("d", "delete connection from view"),
|
("d", "delete connection from view"),
|
||||||
@ -1455,7 +1455,7 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
]
|
]
|
||||||
text.extend(format_keyvals(keys, key="key", val="text", indent=4))
|
text.extend(format_keyvals(keys, key="key", val="text", indent=4))
|
||||||
|
|
||||||
text.extend([("head", "\n\nConnection view keys:\n")])
|
text.append(("head", "\n\nConnection view keys:\n"))
|
||||||
keys = [
|
keys = [
|
||||||
("b", "save request/response body"),
|
("b", "save request/response body"),
|
||||||
("e", "edit request/response"),
|
("e", "edit request/response"),
|
||||||
@ -1467,7 +1467,7 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
]
|
]
|
||||||
text.extend(format_keyvals(keys, key="key", val="text", indent=4))
|
text.extend(format_keyvals(keys, key="key", val="text", indent=4))
|
||||||
|
|
||||||
text.extend([("head", "\n\nFilter expressions:\n")])
|
text.append(("head", "\n\nFilter expressions:\n"))
|
||||||
f = []
|
f = []
|
||||||
for i in filt.filt_unary:
|
for i in filt.filt_unary:
|
||||||
f.append(
|
f.append(
|
||||||
|
Loading…
Reference in New Issue
Block a user