From d852f292c9a45de7f45cc8537f2aef217259017e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Lang?= Date: Mon, 14 Jan 2019 02:02:07 -0300 Subject: Fix flake8 warning in curl_command There was an unused variable (I redefined its value below). It didn't affect the behavior of the function --- mitmproxy/addons/export.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mitmproxy/addons/export.py b/mitmproxy/addons/export.py index 04c0349a..a7152ae4 100644 --- a/mitmproxy/addons/export.py +++ b/mitmproxy/addons/export.py @@ -34,10 +34,7 @@ def curl_command(f: flow.Flow) -> str: # shlex.quote doesn't support a bytes object # see https://github.com/python/cpython/pull/10871 raise exceptions.CommandError("Request content must be valid unicode") - args += [ - "--data-binary", - strutils.always_str(request.content) - ] + args += ["--data-binary", content] return ' '.join(shlex.quote(arg) for arg in args) -- cgit v1.2.3