more explicit error messages during common import errors
This commit is contained in:
parent
32e965d338
commit
535d6efc47
8 changed files with 42 additions and 8 deletions
|
|
@ -18,7 +18,12 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import datetime
|
||||
import feedparser
|
||||
|
||||
try:
|
||||
import feedparser
|
||||
except ImportError:
|
||||
raise ImportError('Please install python-feedparser')
|
||||
|
||||
if feedparser.__version__ >= '5.0':
|
||||
# feedparser >= 5.0 replaces this regexp on sgmllib and mechanize < 2.0
|
||||
# fails with malformated webpages.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue