summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetalgamer2020-12-07 21:53:53 +0100
committermetalgamer2020-12-07 21:53:53 +0100
commit998231e994cf58c9bd5851eb4d8f39581a60f65b (patch)
treee4434cbe2bbfcf12ecb73a8b8d3c6d20f6f11acd
parent95f47606d64db938901074fb4c011004c391e7e4 (diff)
downloadpatternutils-998231e994cf58c9bd5851eb4d8f39581a60f65b.tar.gz
patternutils-998231e994cf58c9bd5851eb4d8f39581a60f65b.zip
Fail with error message, if feedparser not found.
-rw-r--r--patternutils/commands/prss.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/patternutils/commands/prss.py b/patternutils/commands/prss.py
index 814672e..cc81ee1 100644
--- a/patternutils/commands/prss.py
+++ b/patternutils/commands/prss.py
@@ -3,7 +3,11 @@ import os.path
from typing import Generator
import click
-import feedparser
+
+try:
+ import feedparser
+except ImportError:
+ click.secho("feedparser not installed!", fg="red", err=True)
from .. import utils