Browse Source

Merge pull request #72 from v3aqb/dev

fix bug when no config file exists
1.4
clowwindy 11 years ago
parent
commit
6fb09ea8af
  1. 3
      shadowsocks/local.py
  2. 2
      shadowsocks/server.py

3
shadowsocks/local.py

@ -178,6 +178,9 @@ def main():
logging.info('loading config from %s' % config_path)
with open(config_path, 'rb') as f:
config = json.load(f)
else:
config = {}
optlist, args = getopt.getopt(sys.argv[1:], 's:b:p:k:l:m:c:6')
for key, value in optlist:
if key == '-p':

2
shadowsocks/server.py

@ -153,6 +153,8 @@ def main():
with open(config_path, 'rb') as f:
config = json.load(f)
logging.info('loading config from %s' % config_path)
else:
config = {}
optlist, args = getopt.getopt(sys.argv[1:], 's:p:k:m:c:6')
for key, value in optlist:

Loading…
Cancel
Save