Skip to content

Commit

Permalink
1.修正random.randint()取值超出范围
Browse files Browse the repository at this point in the history
  • Loading branch information
huaisha1224 committed Feb 21, 2014
1 parent 4c7ee7b commit bcae790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ShadowSocks_local.py
Expand Up @@ -188,7 +188,7 @@ def main():
#获得"server_password"的长度,得到服务器多端口记录数据
number = len(config["server_password"])
#通过random取一个随机数、来随机分配用哪一条服务器端口密码记录
orientation = random.randint(0, number)
orientation = random.randint(0, number - 1)
server_dict = {}
server_dict[u"server"]= config["server_password"][orientation][0]
server_dict[u"server_port"] = config["server_password"][orientation][1]
Expand Down

0 comments on commit bcae790

Please sign in to comment.