mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-06 22:41:35 +00:00
requestsync: Give user option to retry in case of temporary error (LP: #850360)
This commit is contained in:
parent
73843307f0
commit
677e1b8e4e
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -18,8 +18,9 @@ ubuntu-dev-tools (0.137) UNRELEASED; urgency=low
|
|||||||
|
|
||||||
[ Andreas Moog ]
|
[ Andreas Moog ]
|
||||||
* sponsor-patch: Check permission to unsubscribe sponsors-team (LP: #896884)
|
* sponsor-patch: Check permission to unsubscribe sponsors-team (LP: #896884)
|
||||||
|
* requestsync: Give user option to retry in case of temporary error (LP: #850360)
|
||||||
|
|
||||||
-- Andreas Moog <amoog@ubuntu.com> Sun, 27 Nov 2011 16:47:05 +0100
|
-- Andreas Moog <amoog@ubuntu.com> Sun, 27 Nov 2011 22:13:22 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.136) unstable; urgency=low
|
ubuntu-dev-tools (0.136) unstable; urgency=low
|
||||||
|
|
||||||
|
@ -163,13 +163,20 @@ Content-Type: text/plain; charset=UTF-8
|
|||||||
confirmation_prompt()
|
confirmation_prompt()
|
||||||
|
|
||||||
# connect to the server
|
# connect to the server
|
||||||
try:
|
while True:
|
||||||
Logger.info('Connecting to %s:%s ...', mailserver_host, mailserver_port)
|
try:
|
||||||
s = smtplib.SMTP(mailserver_host, mailserver_port)
|
Logger.info('Connecting to %s:%s ...', mailserver_host, mailserver_port)
|
||||||
except socket.error, s:
|
s = smtplib.SMTP(mailserver_host, mailserver_port)
|
||||||
Logger.error('Could not connect to %s:%s: %s (%i)',
|
break
|
||||||
mailserver_host, mailserver_port, s[1], s[0])
|
except socket.error, s:
|
||||||
return
|
Logger.error('Could not connect to %s:%s: %s (%i)',
|
||||||
|
mailserver_host, mailserver_port, s[1], s[0])
|
||||||
|
return
|
||||||
|
except smtplib.SMTPConnectError, s:
|
||||||
|
Logger.error('Could not connect to %s:%s: %s (%i)',
|
||||||
|
mailserver_host, mailserver_port, s[1], s[0])
|
||||||
|
if s[0] == 421:
|
||||||
|
confirmation_prompt(message="This is a temporary error, press [Enter] to retry. Press [Ctrl-C] to abort now.")
|
||||||
|
|
||||||
if mailserver_user and mailserver_pass:
|
if mailserver_user and mailserver_pass:
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user