bugfix for gpodder.console's del_channel function

git-svn-id: svn://svn.berlios.de/gpodder/branches/gpodder-thp-200708@379 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
Thomas Perl 2007-08-24 15:48:30 +00:00
parent 30a2086fcc
commit b016d0ea92
1 changed files with 8 additions and 6 deletions

View File

@ -85,15 +85,17 @@ def del_channel( url):
url = util.normalize_feed_url( url)
channels = load_channels( load_items = False)
search_list = [ c for c in channels ]
for channel in search_list:
keep_channels = []
for channel in channels:
if channel.url == url:
msg( 'delete', urllib.unquote( channel.url))
channels.remove( channel)
save_channels( channels)
return
else:
keep_channels.append( channel)
msg( 'error', _('Could not remove channel.'))
if len(keep_channels) < len(channels):
save_channels( keep_channels)
else:
msg( 'error', _('Could not remove channel.'))
def update():