aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmailconf
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-04-21 16:00:08 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-04-21 16:00:08 +0000
commit5b5836398b96602b10220871e2073e35276260ef (patch)
treeaf8a8dd6a38c1096ce337c51e2b491ce3517dce2 /fetchmailconf
parent26223327411f8091d183a7d53b3bd9fd0dd33e42 (diff)
downloadfetchmail-5b5836398b96602b10220871e2073e35276260ef.tar.gz
fetchmail-5b5836398b96602b10220871e2073e35276260ef.tar.bz2
fetchmail-5b5836398b96602b10220871e2073e35276260ef.zip
Better deletion handling.
svn path=/trunk/; revision=2888
Diffstat (limited to 'fetchmailconf')
-rwxr-xr-xfetchmailconf9
1 files changed, 7 insertions, 2 deletions
diff --git a/fetchmailconf b/fetchmailconf
index a6600be3..1e63a5c7 100755
--- a/fetchmailconf
+++ b/fetchmailconf
@@ -4,7 +4,7 @@
# by Eric S. Raymond, <esr@snark.thyrsus.com>.
# Requires Python with Tkinter, and the following OS-dependent services:
# posix, posixpath, socket
-version = "1.24"
+version = "1.25"
from Tkinter import *
from Dialog import *
@@ -667,6 +667,8 @@ class ConfigurationEdit(Frame, MyWidget):
def server_delete(self, sitename):
try:
+ for user in self.subwidgets.keys():
+ user.destruct()
del self.configuration[sitename]
except:
pass
@@ -971,6 +973,7 @@ class ServerEdit(Frame, MyWidget):
def user_delete(self, username):
if self.subwidgets.has_key(username):
+ self.subwidgets[username].destruct()
del self.subwidgets[username]
del self.server[username]
@@ -1401,7 +1404,9 @@ class UserEdit(Frame, MyWidget):
return self
def destruct(self):
- del self.parent.subwidgets[self.user.remote]
+ # Yes, this test can fail -- if you delete the parent window.
+ if self.parent.subwidgets.has_key(self.user.remote):
+ del self.parent.subwidgets[self.user.remote]
Widget.destroy(self.master)
def nosave(self):