add a warning when html2text is not found
This commit is contained in:
parent
41a76723b6
commit
05e1058066
1 changed files with 2 additions and 0 deletions
|
|
@ -16,6 +16,7 @@
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
|
from logging import warning
|
||||||
from dateutil import tz
|
from dateutil import tz
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
@ -60,6 +61,7 @@ try:
|
||||||
h2t.SKIP_INTERNAL_LINKS = True
|
h2t.SKIP_INTERNAL_LINKS = True
|
||||||
html2text = h2t.html2text
|
html2text = h2t.html2text
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
warning('python-html is not present. HTML pages will not be converted into text.')
|
||||||
def html2text(s):
|
def html2text(s):
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue