Mercurial > p > roundup > code
comparison roundup/scripts/roundup_mailgw.py @ 2372:c26bb78d2f0c
couple of bugfixes
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 28 May 2004 00:56:50 +0000 |
| parents | b54ad9ed394a |
| children | a9e1fff1e793 |
comparison
equal
deleted
inserted
replaced
| 2366:1d46cd2f83f6 | 2372:c26bb78d2f0c |
|---|---|
| 12 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 12 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 13 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 13 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 16 # | 16 # |
| 17 # $Id: roundup_mailgw.py,v 1.17 2004-05-18 19:26:32 a1s Exp $ | 17 # $Id: roundup_mailgw.py,v 1.18 2004-05-28 00:56:50 richard Exp $ |
| 18 | 18 |
| 19 """Command-line script stub that calls the roundup.mailgw. | 19 """Command-line script stub that calls the roundup.mailgw. |
| 20 """ | 20 """ |
| 21 __docformat__ = 'restructuredtext' | 21 __docformat__ = 'restructuredtext' |
| 22 | 22 |
| 172 m.group('pass'), mailbox, ssl) | 172 m.group('pass'), mailbox, ssl) |
| 173 | 173 |
| 174 return usage(argv, _('Error: The source must be either "mailbox",' | 174 return usage(argv, _('Error: The source must be either "mailbox",' |
| 175 ' "pop", "apop", "imap" or "imaps"')) | 175 ' "pop", "apop", "imap" or "imaps"')) |
| 176 finally: | 176 finally: |
| 177 db.close() | 177 # handler might have closed the initial db and opened a new one |
| 178 handler.db.close() | |
| 178 | 179 |
| 179 def run(): | 180 def run(): |
| 180 # time out after a minute if we can | 181 # time out after a minute if we can |
| 181 import socket | 182 import socket |
| 182 if hasattr(socket, 'setdefaulttimeout'): | 183 if hasattr(socket, 'setdefaulttimeout'): |
