IGN:Fix regression that prevented error being raised when no username and password are specified in the GUI for a recipe that needs them

This commit is contained in:
Kovid Goyal
2009-10-17 14:48:23 -06:00
parent c1c3a6555f
commit d74445922e
2 changed files with 4 additions and 3 deletions
+4 -2
View File
@@ -501,8 +501,10 @@ class BasicNewsRecipe(Recipe):
if isinstance(self.feeds, basestring):
self.feeds = [self.feeds]
if self.needs_subscription and (self.username is None or self.password is None):
raise ValueError('The %s recipe needs a username and password.'%self.title)
if self.needs_subscription and (\
self.username is None or self.password is None or \
(not self.username and not self.password)):
raise ValueError(_('The "%s" recipe needs a username and password.')%self.title)
self.browser = self.get_browser()
self.image_map, self.image_counter = {}, 1