From b1a36bbb11327023f7a5ba3e4b7ed61b50e9b0ae Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 31 Dec 2015 16:35:17 +0800 Subject: [PATCH 1/2] fix --- install/install.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index 34f771284..5552d3c20 100755 --- a/install/install.py +++ b/install/install.py @@ -127,8 +127,11 @@ class PreSetup(object): smtp.quit() return True - except (SMTPAuthenticationError, socket.timeout, socket.gaierror, SMTPSenderRefused, SMTPConnectError), e: + except Exception, e: color_print(e, 'red') + skip = raw_input('是否跳过(y/n) [n]? : ') + if skip == 'y': + return True return False @staticmethod From 5e86b06db863806cf2cb74416b682069694f119a Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 31 Dec 2015 16:41:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- connect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/connect.py b/connect.py index cec2ea05c..69050ea67 100755 --- a/connect.py +++ b/connect.py @@ -800,7 +800,9 @@ def main(): color_print('请输入正确ID', 'red') except ServerError, e: color_print(e, 'red') - except IndexError: + except Exception, e: + color_print(e) + time.sleep(5) pass if __name__ == '__main__':