Mercurial > p > roundup > code
changeset 3386:263e8f485db5
don't try to set a timeout for IMAPS (thanks Paul Jimenez)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 18 Jul 2005 01:19:57 +0000 |
| parents | ed96527b1bda |
| children | 0c66acaea802 |
| files | CHANGES.txt doc/index.txt roundup/scripts/roundup_mailgw.py |
| diffstat | 3 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Tue Jul 12 01:44:30 2005 +0000 +++ b/CHANGES.txt Mon Jul 18 01:19:57 2005 +0000 @@ -33,6 +33,7 @@ - removed debugging code from cgi/actions.py - refactored hyperdb.rawToHyperdb, allowing a number of improvements (thanks Ralf Schlatterbeck) +- don't try to set a timeout for IMAPS (thanks Paul Jimenez) 2005-05-02 0.8.3
--- a/doc/index.txt Tue Jul 12 01:44:30 2005 +0000 +++ b/doc/index.txt Mon Jul 18 01:19:57 2005 +0000 @@ -100,6 +100,7 @@ Uwe Hoffmann, Tobias Hunger, Simon Hyde, +Paul Jimenez, Christophe Kalt, Brian Kelley, James Kew,
--- a/roundup/scripts/roundup_mailgw.py Tue Jul 12 01:44:30 2005 +0000 +++ b/roundup/scripts/roundup_mailgw.py Mon Jul 18 01:19:57 2005 +0000 @@ -14,7 +14,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundup_mailgw.py,v 1.20 2004-09-14 22:09:48 richard Exp $ +# $Id: roundup_mailgw.py,v 1.21 2005-07-18 01:19:57 richard Exp $ """Command-line script stub that calls the roundup.mailgw. """ @@ -24,7 +24,7 @@ from roundup import version_check from roundup import __version__ as roundup_version -import sys, os, re, cStringIO, getopt +import sys, os, re, cStringIO, getopt, socket from roundup import mailgw from roundup.i18n import _ @@ -146,6 +146,12 @@ if len(args) < 3: return usage(argv, _('Error: not enough source specification information')) source, specification = args[1:3] + + # time out net connections after a minute if we can + if source not in ('mailbox', 'imaps'): + if hasattr(socket, 'setdefaulttimeout'): + socket.setdefaulttimeout(60) + if source == 'mailbox': return handler.do_mailbox(specification) elif source == 'pop': @@ -182,10 +188,6 @@ handler.db.close() def run(): - # time out after a minute if we can - import socket - if hasattr(socket, 'setdefaulttimeout'): - socket.setdefaulttimeout(60) sys.exit(main(sys.argv)) # call main
