From e6538cdb1f757e544a20c24c35259e0bbea212ab Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 18 Apr 2018 08:35:07 +1200 Subject: [PATCH] mitmweb: don't blort all over my config file Temporarily disable config saving until we can look at this more closely. Config saving should: - Only happen when explicitly requested by the user - Only save changed values --- mitmproxy/tools/web/app.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py index 936eb75b0..61e30a213 100644 --- a/mitmproxy/tools/web/app.py +++ b/mitmproxy/tools/web/app.py @@ -18,7 +18,6 @@ from mitmproxy import io from mitmproxy import log from mitmproxy import version from mitmproxy import optmanager -from mitmproxy.tools.cmdline import CONFIG_PATH import mitmproxy.tools.web.master # noqa @@ -457,10 +456,11 @@ class Options(RequestHandler): class SaveOptions(RequestHandler): def post(self): - try: - optmanager.save(self.master.options, CONFIG_PATH, True) - except Exception as err: - raise APIError(400, "{}".format(err)) + # try: + # optmanager.save(self.master.options, CONFIG_PATH, True) + # except Exception as err: + # raise APIError(400, "{}".format(err)) + pass class Application(tornado.web.Application):