diff --git a/resources/recipes/economist.recipe b/resources/recipes/economist.recipe index 30bb2688c8..0f70a1e025 100644 --- a/resources/recipes/economist.recipe +++ b/resources/recipes/economist.recipe @@ -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'])] diff --git a/src/calibre/web/feeds/news.py b/src/calibre/web/feeds/news.py index f2c921bd82..43c1dfd5f2 100644 --- a/src/calibre/web/feeds/news.py +++ b/src/calibre/web/feeds/news.py @@ -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