Skip to content

Commit 8b57479

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent 6f97abe commit 8b57479

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Fixed:
2626
- removed debugging code from cgi/actions.py
2727
- refactored hyperdb.rawToHyperdb, allowing a number of improvements
2828
(thanks Ralf Schlatterbeck)
29+
- don't try to set a timeout for IMAPS (thanks Paul Jimenez)
2930

3031

3132
2005-05-02 0.8.3

doc/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Juergen Hermann,
100100
Uwe Hoffmann,
101101
Tobias Hunger,
102102
Simon Hyde,
103+
Paul Jimenez,
103104
Christophe Kalt,
104105
Brian Kelley,
105106
James Kew,

roundup/scripts/roundup_mailgw.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1515
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1616
#
17-
# $Id: roundup_mailgw.py,v 1.20 2004-09-14 22:09:48 richard Exp $
17+
# $Id: roundup_mailgw.py,v 1.20.2.1 2005-07-18 01:28:12 richard Exp $
1818

1919
"""Command-line script stub that calls the roundup.mailgw.
2020
"""
@@ -24,7 +24,7 @@
2424
from roundup import version_check
2525
from roundup import __version__ as roundup_version
2626

27-
import sys, os, re, cStringIO, getopt
27+
import sys, os, re, cStringIO, getopt, socket
2828

2929
from roundup import mailgw
3030
from roundup.i18n import _
@@ -146,6 +146,12 @@ def main(argv):
146146
if len(args) < 3:
147147
return usage(argv, _('Error: not enough source specification information'))
148148
source, specification = args[1:3]
149+
150+
# time out net connections after a minute if we can
151+
if source not in ('mailbox', 'imaps'):
152+
if hasattr(socket, 'setdefaulttimeout'):
153+
socket.setdefaulttimeout(60)
154+
149155
if source == 'mailbox':
150156
return handler.do_mailbox(specification)
151157
elif source == 'pop':
@@ -182,10 +188,6 @@ def main(argv):
182188
handler.db.close()
183189

184190
def run():
185-
# time out after a minute if we can
186-
import socket
187-
if hasattr(socket, 'setdefaulttimeout'):
188-
socket.setdefaulttimeout(60)
189191
sys.exit(main(sys.argv))
190192

191193
# call main

0 commit comments

Comments
 (0)