diff options
Diffstat (limited to 'mitmproxy/addons/cut.py')
-rw-r--r-- | mitmproxy/addons/cut.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/addons/cut.py b/mitmproxy/addons/cut.py index a4a2107b..5ec4c99e 100644 --- a/mitmproxy/addons/cut.py +++ b/mitmproxy/addons/cut.py @@ -96,7 +96,7 @@ class Cut: return ret @command.command("cut.save") - def save(self, cuts: command.Cuts, path: str) -> None: + def save(self, cuts: command.Cuts, path: command.Path) -> None: """ Save cuts to file. If there are multiple rows or columns, the format is UTF-8 encoded CSV. If there is exactly one row and one column, @@ -107,7 +107,7 @@ class Cut: append = False if path.startswith("+"): append = True - path = path[1:] + path = command.Path(path[1:]) if len(cuts) == 1 and len(cuts[0]) == 1: with open(path, "ab" if append else "wb") as fp: if fp.tell() > 0: |