mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Merge pull request #3104 from cortesi/cmdcall
Zap some commands.call invocations that were missed in the rename
This commit is contained in:
commit
7ec9c5524f
@ -147,7 +147,7 @@ class ConsoleAddon:
|
|||||||
fv = self.master.window.current("options")
|
fv = self.master.window.current("options")
|
||||||
if not fv:
|
if not fv:
|
||||||
raise exceptions.CommandError("Not viewing options.")
|
raise exceptions.CommandError("Not viewing options.")
|
||||||
self.master.commands.call("options.reset.one %s" % fv.current_name())
|
self.master.commands.execute("options.reset.one %s" % fv.current_name())
|
||||||
|
|
||||||
@command.command("console.nav.start")
|
@command.command("console.nav.start")
|
||||||
def nav_start(self) -> None:
|
def nav_start(self) -> None:
|
||||||
@ -237,7 +237,7 @@ class ConsoleAddon:
|
|||||||
repl = cmd + " " + " ".join(args)
|
repl = cmd + " " + " ".join(args)
|
||||||
repl = repl.replace("{choice}", opt)
|
repl = repl.replace("{choice}", opt)
|
||||||
try:
|
try:
|
||||||
self.master.commands.call(repl)
|
self.master.commands.execute(repl)
|
||||||
except exceptions.CommandError as e:
|
except exceptions.CommandError as e:
|
||||||
signals.status_message.send(message=str(e))
|
signals.status_message.send(message=str(e))
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ class ConsoleAddon:
|
|||||||
repl = shlex.quote(" ".join(args))
|
repl = shlex.quote(" ".join(args))
|
||||||
repl = repl.replace("{choice}", opt)
|
repl = repl.replace("{choice}", opt)
|
||||||
try:
|
try:
|
||||||
self.master.commands.call(subcmd + " " + repl)
|
self.master.commands.execute(subcmd + " " + repl)
|
||||||
except exceptions.CommandError as e:
|
except exceptions.CommandError as e:
|
||||||
signals.status_message.send(message=str(e))
|
signals.status_message.send(message=str(e))
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ class ConsoleAddon:
|
|||||||
"""
|
"""
|
||||||
option_value = getattr(self.master.options, option, None)
|
option_value = getattr(self.master.options, option, None)
|
||||||
current_value = option_value if option_value else ""
|
current_value = option_value if option_value else ""
|
||||||
self.master.commands.call(
|
self.master.commands.execute(
|
||||||
"console.command set %s=%s" % (option, current_value)
|
"console.command set %s=%s" % (option, current_value)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -429,7 +429,7 @@ class ConsoleAddon:
|
|||||||
elif part == "set-cookies":
|
elif part == "set-cookies":
|
||||||
self.master.switch_view("edit_focus_setcookies")
|
self.master.switch_view("edit_focus_setcookies")
|
||||||
elif part in ["url", "method", "status_code", "reason"]:
|
elif part in ["url", "method", "status_code", "reason"]:
|
||||||
self.master.commands.call(
|
self.master.commands.execute(
|
||||||
"console.command flow.set @focus %s " % part
|
"console.command flow.set @focus %s " % part
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class FlowItem(urwid.WidgetWrap):
|
|||||||
def mouse_event(self, size, event, button, col, row, focus):
|
def mouse_event(self, size, event, button, col, row, focus):
|
||||||
if event == "mouse press" and button == 1:
|
if event == "mouse press" and button == 1:
|
||||||
if self.flow.request:
|
if self.flow.request:
|
||||||
self.master.commands.call("console.view.flow @focus")
|
self.master.commands.execute("console.view.flow @focus")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def keypress(self, size, key):
|
def keypress(self, size, key):
|
||||||
|
Loading…
Reference in New Issue
Block a user