From 2621e5e5642c896cd8ac6545c1a8c3a7ca978f3c Mon Sep 17 00:00:00 2001 From: BreakWa11 Date: Sat, 25 Jun 2016 14:01:47 +0800 Subject: [PATCH] fix mgr under py3 --- mujson_mgr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mujson_mgr.py b/mujson_mgr.py index 4518c6f..e3e4d83 100644 --- a/mujson_mgr.py +++ b/mujson_mgr.py @@ -2,7 +2,7 @@ # -*- coding: UTF-8 -*- import traceback -from shadowsocks import common, shell +from shadowsocks import shell from configloader import load_config, get_config import random import getopt @@ -50,7 +50,7 @@ class MuMgr(object): return ret def rand_pass(self): - return b''.join([random.choice(b'''ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~-_=+(){}[]^&%$@''') for i in range(8)]) + return ''.join([random.choice('''ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~-_=+(){}[]^&%$@''') for i in range(8)]) def add(self, user): up = {'enable': True, 'u': 0, 'd': 0, 'method': "aes-128-cfb",