mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
c1c3a6555f
commit
d74445922e
@ -18,7 +18,6 @@ class Economist(BasicNewsRecipe):
|
||||
__author__ = "Kovid Goyal"
|
||||
description = 'Global news and current affairs from a European perspective'
|
||||
oldest_article = 7.0
|
||||
needs_subscription = False # Strange but true
|
||||
INDEX = 'http://www.economist.com/printedition'
|
||||
cover_url = 'http://www.economist.com/images/covers/currentcovereu_large.jpg'
|
||||
remove_tags = [dict(name=['script', 'noscript', 'title'])]
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user