make pep8 linter happy
This commit is contained in:
parent
6fb09ea8af
commit
710cd97094
2 changed files with 8 additions and 8 deletions
|
@ -145,7 +145,7 @@ class Socks5Server(SocketServer.StreamRequestHandler):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global SERVER, REMOTE_PORT, PORT, KEY, METHOD, LOCAL, IPv6
|
global SERVER, REMOTE_PORT, PORT, KEY, METHOD, LOCAL, IPv6
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG,
|
logging.basicConfig(level=logging.DEBUG,
|
||||||
format='%(asctime)s %(levelname)-8s %(message)s',
|
format='%(asctime)s %(levelname)-8s %(message)s',
|
||||||
datefmt='%Y-%m-%d %H:%M:%S', filemode='a+')
|
datefmt='%Y-%m-%d %H:%M:%S', filemode='a+')
|
||||||
|
@ -167,7 +167,7 @@ def main():
|
||||||
METHOD = None
|
METHOD = None
|
||||||
LOCAL = ''
|
LOCAL = ''
|
||||||
IPv6 = False
|
IPv6 = False
|
||||||
|
|
||||||
config_path = utils.find_config()
|
config_path = utils.find_config()
|
||||||
optlist, args = getopt.getopt(sys.argv[1:], 's:b:p:k:l:m:c:6')
|
optlist, args = getopt.getopt(sys.argv[1:], 's:b:p:k:l:m:c:6')
|
||||||
for key, value in optlist:
|
for key, value in optlist:
|
||||||
|
@ -209,7 +209,7 @@ def main():
|
||||||
sys.exit('config not specified, please read https://github.com/clowwindy/shadowsocks')
|
sys.exit('config not specified, please read https://github.com/clowwindy/shadowsocks')
|
||||||
|
|
||||||
utils.check_config(config)
|
utils.check_config(config)
|
||||||
|
|
||||||
encrypt.init_table(KEY, METHOD)
|
encrypt.init_table(KEY, METHOD)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -223,6 +223,6 @@ def main():
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
server.shutdown()
|
server.shutdown()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -39,7 +39,6 @@ import socket
|
||||||
import select
|
import select
|
||||||
import SocketServer
|
import SocketServer
|
||||||
import struct
|
import struct
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
import getopt
|
import getopt
|
||||||
import encrypt
|
import encrypt
|
||||||
|
@ -124,13 +123,14 @@ class Socks5Server(SocketServer.StreamRequestHandler):
|
||||||
except socket.error, e:
|
except socket.error, e:
|
||||||
logging.warn(e)
|
logging.warn(e)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global SERVER, PORT, KEY, METHOD, IPv6
|
global SERVER, PORT, KEY, METHOD, IPv6
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG,
|
logging.basicConfig(level=logging.DEBUG,
|
||||||
format='%(asctime)s %(levelname)-8s %(message)s',
|
format='%(asctime)s %(levelname)-8s %(message)s',
|
||||||
datefmt='%Y-%m-%d %H:%M:%S', filemode='a+')
|
datefmt='%Y-%m-%d %H:%M:%S', filemode='a+')
|
||||||
|
|
||||||
version = ''
|
version = ''
|
||||||
try:
|
try:
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
@ -142,7 +142,7 @@ def main():
|
||||||
KEY = None
|
KEY = None
|
||||||
METHOD = None
|
METHOD = None
|
||||||
IPv6 = False
|
IPv6 = False
|
||||||
|
|
||||||
config_path = utils.find_config()
|
config_path = utils.find_config()
|
||||||
optlist, args = getopt.getopt(sys.argv[1:], 's:p:k:m:c:6')
|
optlist, args = getopt.getopt(sys.argv[1:], 's:p:k:m:c:6')
|
||||||
for key, value in optlist:
|
for key, value in optlist:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue