mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Let's trying raising exceptions from readability not working, and catching them upstream.
This commit is contained in:
parent
0c23b6eeb5
commit
6dcfc2ae15
1 changed files with 7 additions and 6 deletions
13
vendor/readability/readability.py
vendored
13
vendor/readability/readability.py
vendored
|
@ -260,12 +260,13 @@ class Document:
|
|||
else:
|
||||
return cleaned_article
|
||||
except Exception as e:
|
||||
log.exception("error getting summary: ")
|
||||
if sys.version_info[0] == 2:
|
||||
from .compat.two import raise_with_traceback
|
||||
else:
|
||||
from .compat.three import raise_with_traceback
|
||||
raise_with_traceback(Unparseable, sys.exc_info()[2], str_(e))
|
||||
# log.exception("error getting summary: ")
|
||||
# if sys.version_info[0] == 2:
|
||||
# from .compat.two import raise_with_traceback
|
||||
# else:
|
||||
# from .compat.three import raise_with_traceback
|
||||
# raise_with_traceback(Unparseable, sys.exc_info()[2], str_(e))
|
||||
raise e
|
||||
|
||||
def get_article(self, candidates, best_candidate, html_partial=False):
|
||||
# Now that we have the top candidate, look through its siblings for
|
||||
|
|
Loading…
Add table
Reference in a new issue