|
16 | 16 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
17 | 17 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
18 | 18 | # |
19 | | -# $Id: roundup-mailgw,v 1.20 2002-01-07 10:43:48 richard Exp $ |
| 19 | +# $Id: roundup-mailgw,v 1.21 2002-01-11 07:02:29 grubert Exp $ |
20 | 20 |
|
21 | 21 | # python version check |
22 | 22 | from roundup import version_check |
@@ -64,10 +64,15 @@ def do_pop(handler, server, user='', password=''): |
64 | 64 | '''Read a series of messages from the specified POP server. |
65 | 65 | ''' |
66 | 66 | import getpass, poplib, socket |
67 | | - if not user: |
68 | | - user = raw_input(_('User: ')) |
69 | | - if not password: |
70 | | - password = getpass.getpass() |
| 67 | + try: |
| 68 | + if not user: |
| 69 | + user = raw_input(_('User: ')) |
| 70 | + if not password: |
| 71 | + password = getpass.getpass() |
| 72 | + except (KeyboardInterrupt, EOFError): |
| 73 | + # Ctrl C or D maybe also Ctrl Z under Windows. |
| 74 | + print "\nAborted by user." |
| 75 | + return 1 |
71 | 76 |
|
72 | 77 | # open a connection to the server and retrieve all messages |
73 | 78 | try: |
@@ -173,6 +178,9 @@ if __name__ == '__main__': |
173 | 178 |
|
174 | 179 | # |
175 | 180 | # $Log: not supported by cvs2svn $ |
| 181 | +# Revision 1.20 2002/01/07 10:43:48 richard |
| 182 | +# #500329 ] exception on server not reachable-patch |
| 183 | +# |
176 | 184 | # Revision 1.19 2002/01/05 02:19:03 richard |
177 | 185 | # i18n'ification |
178 | 186 | # |
|
0 commit comments