handle broken pipe correctly from plugins

Before this, doing "feed2exec parse foo | head" would yield an error
message for *every* feed item. This silences the warnings completely.
parent b5aebc55
......@@ -103,6 +103,9 @@ def output(feed, item, lock=None):
plugin = importlib.import_module(plugin)
return plugin.output(*args, feed=feed, item=item, lock=lock)
except (BrokenPipeError):
# handle pipe errors gracefully, e.g. | head
except Exception as e:
logging.exception("plugin generated exception: %s, skipping", e)
return None
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment