From 606ac86b5fc9d491a2793d6685e75909aa1b2602 Mon Sep 17 00:00:00 2001 From: khayber Date: Sun, 24 Sep 2006 02:23:04 +0000 Subject: [PATCH] Added socket timeout so that stuck servers won't hang the applet (5 seconds) Fixed oops with Account Editor (missing call to edit_account) --- accounts.py | 3 +++ postal.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/accounts.py b/accounts.py index d7a4827..f0745af 100644 --- a/accounts.py +++ b/accounts.py @@ -175,6 +175,7 @@ class AccountList(rox.Dialog): account = mbox_check.MBOXChecker() else: return + self.edit_account(account) self.accts.append([account.name, account.protocol, account]) self.accounts.append(account) @@ -197,6 +198,8 @@ class AccountList(rox.Dialog): dlg = MBOXEditor(account) elif account.protocol == 'POP': dlg = POPEditor(account) + else: + return dlg.set_transient_for(self) dlg.set_modal(True) dlg.run() diff --git a/postal.py b/postal.py index 5d3c723..dc0f71f 100644 --- a/postal.py +++ b/postal.py @@ -19,6 +19,9 @@ """ # standard library modules +import socket +socket.setdefaulttimeout(5) #set a reasonable timeout for imaplib & poplib + import sys, os, time, gtk, gobject, rox, getpass, popen2, ConfigParser from rox import applet, filer, tasks, basedir from rox.options import Option -- 2.11.4.GIT