MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / revert

Method revert

mitmproxy/addons/core.py:107–117  ·  view source on GitHub ↗

Revert flow changes.

(self, flows: Sequence[flow.Flow])

Source from the content-addressed store, hash-verified

105 # FIXME: this will become view.revert later
106 @command.command("flow.revert")
107 def revert(self, flows: Sequence[flow.Flow]) -> None:
108 """
109 Revert flow changes.
110 """
111 updated = []
112 for f in flows:
113 if f.modified():
114 f.revert()
115 updated.append(f)
116 logger.log(ALERT, "Reverted %s flows." % len(updated))
117 ctx.master.addons.trigger(hooks.UpdateHook(updated))
118
119 @command.command("flow.set.options")
120 def flow_set_options(self) -> Sequence[str]:

Callers 4

test_revertFunction · 0.95
putMethod · 0.45
postMethod · 0.45
stop_replayMethod · 0.45

Calls 4

modifiedMethod · 0.80
triggerMethod · 0.80
appendMethod · 0.45
logMethod · 0.45

Tested by 1

test_revertFunction · 0.76