diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-01-31 18:00:43 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-01-31 18:00:43 +0000 |
commit | d460f445287037708d6962fff4082704164850e9 (patch) | |
tree | 5b71f479717b229bb5a55a6d4e4c97d5509c074d | |
parent | ce4a6450ff94ffc9dddc7ce06829953dd3579978 (diff) | |
download | fetchmail-d460f445287037708d6962fff4082704164850e9.tar.gz fetchmail-d460f445287037708d6962fff4082704164850e9.tar.bz2 fetchmail-d460f445287037708d6962fff4082704164850e9.zip |
Handle user deletion properly.
svn path=/trunk/; revision=2366
-rwxr-xr-x | fetchmailconf | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fetchmailconf b/fetchmailconf index 5f210bd4..b49fc7b0 100755 --- a/fetchmailconf +++ b/fetchmailconf @@ -167,7 +167,7 @@ class Server: def __delitem__(self, name): for ui in range(len(self.users)): - if self.users[ui].pollname == name: + if self.users[ui].remote == name: del self.users[ui] break @@ -624,7 +624,8 @@ class ConfigurationEdit(Frame, MyWidget): self.subwidgets[sitename] = ServerEdit(sitename, self).edit(self.mode, Toplevel()) def server_delete(self, sitename): - del self.configuration[sitename] + if self.configuration.has_keys(sitename): + del self.configuration[sitename] def edit(self, mode): self.mode = mode @@ -911,7 +912,9 @@ class ServerEdit(Frame, MyWidget): self.subwidgets[username] = UserEdit(username, self).edit(mode, Toplevel()) def user_delete(self, username): - del self.subwidgets[username] + if self.subwidgets.has_key(username): + del self.subwidgets[username] + del self.server[username] def makeWidgets(self, host, mode): topwin = dispose_window(self, "Server options for querying " + host, serverhelp) |