Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Commit

Permalink
修复了手机号码未在twilio上验证而导致的程序异常结束的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoQi99 committed Mar 16, 2018
1 parent 1309ea3 commit 21a8bf0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
7 changes: 4 additions & 3 deletions Pydoc/send.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@
&nbsp;<br>
@author:&nbsp;QiZhao<br>
@license:&nbsp;GNU&nbsp;GPLv3<br>
@version:&nbsp;0.1.0</tt></p>
@version:&nbsp;0.1.3</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>

<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="smtplib.html">smtplib</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="twilio.base.html">twilio.base</a><br>
</td><td width="25%" valign=top><a href="smtplib.html">smtplib</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
Expand Down
4 changes: 2 additions & 2 deletions source/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# encoding='utf-8'
# encoding='utf-8'
'''
Created on Mar 8, 2018
Expand Down Expand Up @@ -35,7 +35,7 @@ def Init():

def Show_right():
'''显示程序版权声明'''
print('陕师大校园通知自动提醒'+' '+'V0.1.2')
print('陕师大校园通知自动提醒'+' '+'V0.1.3')
print('版权所有 (c) QiZhao 保留所有权利。 ')
print('本程序仅供学习和研究使用,不得用于任何商业用途.')
print('如您在使用中遇到任何问题,可联系作者邮箱: zhaoqi99@outlook.com')
Expand Down
6 changes: 4 additions & 2 deletions source/send.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# encoding='utf-8'
# encoding='utf-8'
'''
Created on Mar 7, 2018
@author: QiZhao
@license: GNU GPLv3
@version: 0.1.0
@version: 0.1.3
'''
from twilio.rest import Client
from email.mime.text import MIMEText
Expand Down Expand Up @@ -45,6 +45,8 @@ def Send_sms(send_number, msg):
except ConnectionError:
# print('发送失败,请检查你的账号是否有效或网络是否良好!')
log_send_sms = send_number + ' ' + '短信发送失败,请检查你的账号是否有效或网络是否良好!' + '\n'
except base.exceptions.TwilioRestException:
log_send_sms=send_number+' '+'短信发送失败,手机号码尚未经过验证,请联系作者进行验证!\n'
return log_send_sms


Expand Down
Binary file not shown.

0 comments on commit 21a8bf0

Please sign in to comment.