Skip to content

Commit c6f2198

Browse files
author
esdeathlove
committed
pep8
1 parent 24d23cf commit c6f2198

30 files changed

+4009
-2960
lines changed

apiconfig.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
NODE_ID = 1
33

44

5-
#hour,set 0 to disable
5+
# hour,set 0 to disable
66
SPEEDTEST = 6
77
CLOUDSAFE = 1
88
ANTISSATTACK = 0
@@ -11,13 +11,13 @@
1111
MU_SUFFIX = 'zhaoj.in'
1212
MU_REGEX = '%5m%id.%suffix'
1313

14-
SERVER_PUB_ADDR = '127.0.0.1' # mujson_mgr need this to generate ssr link
15-
API_INTERFACE = 'modwebapi' #glzjinmod, modwebapi
14+
SERVER_PUB_ADDR = '127.0.0.1' # mujson_mgr need this to generate ssr link
15+
API_INTERFACE = 'modwebapi' # glzjinmod, modwebapi
1616

1717
WEBAPI_URL = 'https://zhaoj.in'
1818
WEBAPI_TOKEN = 'glzjin'
1919

20-
#mudb
20+
# mudb
2121
MUDB_FILE = 'mudb.json'
2222

2323
# Mysql
@@ -42,10 +42,10 @@
4242

4343
# Manager (ignore this)
4444
MANAGE_PASS = 'ss233333333'
45-
#if you want manage in other server you should set this value to global ip
45+
# if you want manage in other server you should set this value to global ip
4646
MANAGE_BIND_IP = '127.0.0.1'
47-
#make sure this port is idle
47+
# make sure this port is idle
4848
MANAGE_PORT = 23333
4949

50-
#Safety
50+
# Safety
5151
IP_MD5_SALT = 'randomforsafety'

asyncmgr.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import server_pool
3434
import Config
3535

36+
3637
class ServerMgr(object):
3738

3839
def __init__(self):
@@ -59,15 +60,16 @@ def add_to_loop(self, loop):
5960

6061
def _handle_data(self, sock):
6162
data, addr = sock.recvfrom(128)
62-
#manage pwd:port:passwd:action
63+
# manage pwd:port:passwd:action
6364
args = data.split(':')
6465
if len(args) < 4:
6566
return
6667
if args[0] == Config.MANAGE_PASS:
6768
if args[3] == '0':
6869
server_pool.ServerPool.get_instance().cb_del_server(args[1])
6970
elif args[3] == '1':
70-
server_pool.ServerPool.get_instance().new_server(args[1], args[2])
71+
server_pool.ServerPool.get_instance(
72+
).new_server(args[1], args[2])
7173

7274
def handle_event(self, sock, fd, event):
7375
if sock != self._sock:

0 commit comments

Comments
 (0)