mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +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 ]
|
||||
* 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
|
||||
|
||||
|
@ -163,13 +163,20 @@ Content-Type: text/plain; charset=UTF-8
|
||||
confirmation_prompt()
|
||||
|
||||
# connect to the server
|
||||
try:
|
||||
Logger.info('Connecting to %s:%s ...', mailserver_host, mailserver_port)
|
||||
s = smtplib.SMTP(mailserver_host, mailserver_port)
|
||||
except socket.error, s:
|
||||
Logger.error('Could not connect to %s:%s: %s (%i)',
|
||||
mailserver_host, mailserver_port, s[1], s[0])
|
||||
return
|
||||
while True:
|
||||
try:
|
||||
Logger.info('Connecting to %s:%s ...', mailserver_host, mailserver_port)
|
||||
s = smtplib.SMTP(mailserver_host, mailserver_port)
|
||||
break
|
||||
except socket.error, s:
|
||||
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:
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user