http flake8 fixes

This commit is contained in:
lakshyacis 2019-09-03 19:56:59 +05:30
parent 68e09a5e30
commit 7eced454d1
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB

View File

@ -2,11 +2,13 @@ import socket
from advanceddispatcher import AdvancedDispatcher
import asyncore_pollchoose as asyncore
from proxy import Proxy, ProxyError, GeneralProxyError
from socks5 import Socks5Connection, Socks5Resolver, Socks5AuthError, Socks5Error
from socks4a import Socks4aConnection, Socks4aResolver, Socks4aError
from proxy import ProxyError
from socks5 import Socks5Connection, Socks5Resolver
from socks4a import Socks4aConnection, Socks4aResolver
class HttpError(ProxyError): pass
class HttpError(ProxyError):
pass
class HttpConnection(AdvancedDispatcher):
@ -19,7 +21,9 @@ class HttpConnection(AdvancedDispatcher):
print "connecting in background to %s:%i" % (self.destination[0], self.destination[1])
def state_init(self):
self.append_write_buf("GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n" % (self.path, self.destination[0]))
self.append_write_buf(
"GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n" % (
self.path, self.destination[0]))
print "Sending %ib" % (len(self.write_buf))
self.set_state("http_request_sent", 0)
return False