From d31f2698a5c2932eef7593f01ca80b8ddb21e18b Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 3 Nov 2016 16:19:18 +1300 Subject: [PATCH] addons.onboarding: remove duplicate code --- mitmproxy/addons/onboardingapp/app.py | 16 ---------------- test/mitmproxy/addons/test_intercept.py | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/mitmproxy/addons/onboardingapp/app.py b/mitmproxy/addons/onboardingapp/app.py index 50b52214a..d418952c7 100644 --- a/mitmproxy/addons/onboardingapp/app.py +++ b/mitmproxy/addons/onboardingapp/app.py @@ -6,7 +6,6 @@ import tornado.wsgi from mitmproxy.utils import data from mitmproxy.proxy import config -from mitmproxy.addons import wsgiapp loader = tornado.template.Loader(data.pkg_data.path("addons/onboardingapp/templates")) @@ -92,18 +91,3 @@ application = tornado.web.Application( ], # debug=True ) - - -class Onboarding(wsgiapp.WSGIApp): - def __init__(self): - super().__init__(Adapter(application), None, None) - self.enabled = False - - def configure(self, options, updated): - self.host = options.app_host - self.port = options.app_port - self.enabled = options.app - - def request(self, f): - if self.enabled: - super().request(f) diff --git a/test/mitmproxy/addons/test_intercept.py b/test/mitmproxy/addons/test_intercept.py index 5178cb972..a347f9abd 100644 --- a/test/mitmproxy/addons/test_intercept.py +++ b/test/mitmproxy/addons/test_intercept.py @@ -40,4 +40,4 @@ def test_simple(): f = tflow.tflow(resp=True) f.reply._state = "handled" r.response(f) - assert f.intercepted \ No newline at end of file + assert f.intercepted