Skip to content

Commit

Permalink
autoflake
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Feb 14, 2016
1 parent efcfc62 commit 6746cf5
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 18 deletions.
1 change: 0 additions & 1 deletion libmproxy/protocol/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ def send_error_response(self, code, message):
self.send_response(response)
except (NetlibException, H2Error):
self.log(traceback.format_exc(), "debug")
pass

def change_upstream_proxy_server(self, address):
# Make set_upstream_proxy_server always available,
Expand Down
3 changes: 0 additions & 3 deletions libmproxy/protocol/http1.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
from __future__ import (absolute_import, print_function, division)

import six

from netlib import tcp
from netlib.http import http1

from .http import _HttpTransmissionLayer, HttpLayer
from .. import utils
from ..models import HTTPRequest, HTTPResponse


Expand Down
2 changes: 0 additions & 2 deletions libmproxy/protocol/http2.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
from .http import _HttpTransmissionLayer, HttpLayer
from .. import utils
from ..models import HTTPRequest, HTTPResponse
from ..exceptions import HttpProtocolException
from ..exceptions import ProtocolException


class SafeH2Connection(H2Connection):
Expand Down
2 changes: 1 addition & 1 deletion libmproxy/protocol/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def _establish_tls_with_client_and_server(self):
try:
self.ctx.connect()
self._establish_tls_with_server()
except Exception as e:
except Exception:
try:
self._establish_tls_with_client()
except:
Expand Down
2 changes: 1 addition & 1 deletion test/test_console_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_helptext(self):
assert h.helptext()

def test_keypress(self):
master = DummyMaster()
DummyMaster()
h = help.HelpView([1, 2, 3])
assert not h.keypress((0, 0), "q")
assert not h.keypress((0, 0), "?")
Expand Down
4 changes: 2 additions & 2 deletions test/test_filt.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def test_body(self):

def test_method(self):
q = self.req()
s = self.resp()
self.resp()
assert self.q("~m get", q)
assert not self.q("~m post", q)

Expand All @@ -218,7 +218,7 @@ def test_method(self):

def test_domain(self):
q = self.req()
s = self.resp()
self.resp()
assert self.q("~d host", q)
assert not self.q("~d none", q)

Expand Down
4 changes: 2 additions & 2 deletions test/test_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class TestFlow(object):

def test_copy(self):
f = tutils.tflow(resp=True)
a0 = f.get_state()
f.get_state()
f2 = f.copy()
a = f.get_state()
b = f2.get_state()
Expand Down Expand Up @@ -532,7 +532,7 @@ def test_flow(self):
assert c.flow_count() == 2
assert c.active_flow_count() == 1

_ = HTTPResponse.wrap(netlib.tutils.tresp())
HTTPResponse.wrap(netlib.tutils.tresp())
assert not c.update_flow(None)
assert c.active_flow_count() == 1

Expand Down
3 changes: 1 addition & 2 deletions test/test_protocol_http1.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from netlib.exceptions import HttpSyntaxException
from netlib.http import http1
from netlib.tcp import TCPClient
from netlib.tutils import treq, raises
from netlib.tutils import treq
from . import tutils, tservers


Expand Down
4 changes: 0 additions & 4 deletions test/test_protocol_http2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
import traceback
import os
import tempfile
import sys

from libmproxy.proxy.config import ProxyConfig
from libmproxy.proxy.server import ProxyServer
from libmproxy.cmdline import APP_HOST, APP_PORT

import logging
Expand All @@ -24,9 +22,7 @@
from netlib.utils import http2_read_raw_frame

import h2
from hyperframe.frame import Frame

from libmproxy import utils
from . import tservers

requires_alpn = pytest.mark.skipif(
Expand Down

0 comments on commit 6746cf5

Please sign in to comment.