From 1fc86733ba6e117ece50b4f6b0b6f707906c5139 Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 18 Dec 2015 18:27:12 +0800 Subject: [PATCH] fix install bug --- install/next.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/install/next.py b/install/next.py index b90355f22..a7765749f 100644 --- a/install/next.py +++ b/install/next.py @@ -24,14 +24,23 @@ class Setup(object): """ def __init__(self): - self.admin_user = '' - self.admin_pass = '' + self.admin_user = 'admin' + self.admin_pass = 'Lov@wife' def _input_admin(self): while True: - self.admin_user = raw_input('请输入管理员用户名 [%s]: ' % self.admin_user).strip() - self.admin_pass = raw_input('请输入管理员密码: ').strip() - admin_pass_again = raw_input('请再次输入管理员密码: ').strip() + admin_user = raw_input('请输入管理员用户名 [%s]: ' % self.admin_user).strip() + admin_pass = raw_input('请输入管理员密码: [%s]: ' % self.admin_pass).strip() + admin_pass_again = raw_input('请再次输入管理员密码: [%s]: ' % self.admin_pass).strip() + + if admin_user: + self.admin_user = admin_user + + if not admin_pass_again: + admin_pass_again = self.admin_pass + + if admin_pass: + self.admin_pass = admin_pass if self.admin_pass != admin_pass_again: color_print('两次密码不相同请重新输入')