From bae7d7a0c2c1bf5b0a91898abf5a8db3342dd288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Thu, 2 Mar 2017 23:20:06 +0800 Subject: [PATCH] fix str type under py3 --- mujson_mgr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mujson_mgr.py b/mujson_mgr.py index 760763c..d7f4421 100644 --- a/mujson_mgr.py +++ b/mujson_mgr.py @@ -76,7 +76,7 @@ class MuMgr(object): for row in self.data.json: if int(row['port']) == muid: param = str(muid) + ':' + row['passwd'] - protocol_param = '/?protoparam=' + base64.urlsafe_b64encode(common.to_bytes(param)).replace("=", "") + protocol_param = '/?protoparam=' + common.to_str(base64.urlsafe_b64encode(common.to_bytes(param))).replace("=", "") break link = ("%s:%s:%s:%s:%s:%s" % (self.server_addr, user['port'], protocol, user['method'], obfs, common.to_str(base64.urlsafe_b64encode(common.to_bytes(user['passwd']))).replace("=", ""))) + protocol_param return "ssr://" + (encode and common.to_str(base64.urlsafe_b64encode(common.to_bytes(link))).replace("=", "") or link)