Browse Source

auto get ip in mujson_mgr.py

dev
BreakWa11 9 years ago
parent
commit
68d0c8e260
  1. 6
      mujson_mgr.py

6
mujson_mgr.py

@ -30,6 +30,12 @@ class MuMgr(object):
self.config_path = get_config().MUDB_FILE
self.server_addr = get_config().SERVER_PUB_ADDR
self.data = MuJsonLoader()
if self.server_addr == '127.0.0.1':
try:
import socket
self.server_addr = socket.gethostbyname(socket.gethostname())
except:
pass
def ssrlink(self, user):
protocol = user.get('protocol', '')

Loading…
Cancel
Save