Roundup Tracker - Issues

Issue 500329

classification
exception on server not reachable-patch
Type: Severity: normal
Components: Mail interface Versions:
process
Status: closed fixed
:
: richard : grubert, richard
Priority: normal :

Created on 2002-01-07 10:05 by grubert, last changed 2002-01-07 10:05 by grubert.

Messages
msg109 Author: [hidden] (grubert) Date: 2002-01-07 10:05
attaching never worked for me: 
diff -w -u -w -r1.19 roundup-mailgw
--- roundup-mailgw  2002/01/05 02:19:03 1.19
+++ roundup-mailgw  2002/01/07 07:07:11
@@ -60,6 +60,9 @@
     fcntl.flock(f.fileno(), FCNTL.LOCK_UN)
     return 0

+# socket for poplib exceptions.
+import socket
+
 def do_pop(handler, server, user='', password=''):
     '''Read a series of messages from the specified POP server.
     '''
@@ -70,7 +73,11 @@
         password = getpass.getpass()

     # open a connection to the server and retrieve all messages
+    try:
     server = poplib.POP3(server)
+    except socket.error, e:
+        print e
+        return 1
     server.user(user)
     server.pass_(password)
     numMessages = len(server.list()[1])
History
Date User Action Args
2002-01-07 10:05:12grubertcreate