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
This commit is contained in:
Aldo Cortesi 2018-04-18 08:35:07 +12:00
parent bca0275427
commit e6538cdb1f

View File

@ -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):