raise EventError when no results are found, to avoid double stderr write (youtube.py)

This commit is contained in:
jesopo 2019-02-14 01:00:16 +00:00
parent 2794d7235b
commit 15fc5f7124

View file

@ -111,7 +111,7 @@ class Module(ModuleManager.BaseModule):
if search_page.data["pageInfo"]["totalResults"] > 0:
video_id = search_page.data["items"][0]["id"]["videoId"]
else:
event["stderr"].write("No videos found")
raise utils.EventError("No videos found")
else:
raise utils.EventsResultsError()
if video_id: