mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Better error message in debug log when failed to fetch a news article
This commit is contained in:
parent
4259d185e7
commit
5e2a2d71a6
@ -839,7 +839,13 @@ class BasicNewsRecipe(Recipe):
|
||||
fetcher.image_url_processor = self.image_url_processor
|
||||
res, path, failures = fetcher.start_fetch(url), fetcher.downloaded_paths, fetcher.failed_links
|
||||
if not res or not os.path.exists(res):
|
||||
raise Exception(_('Could not fetch article. Run with -vv to see the reason'))
|
||||
msg = _('Could not fetch article.') + ' '
|
||||
if self.debug:
|
||||
msg += _('The debug traceback is available earlier in this log')
|
||||
else:
|
||||
msg += _('Run with -vv to see the reason')
|
||||
raise Exception(msg)
|
||||
|
||||
return res, path, failures
|
||||
|
||||
def fetch_article(self, url, dir, f, a, num_of_feeds):
|
||||
|
Loading…
x
Reference in New Issue
Block a user