raise EventError when no results are found, to avoid double stderr write (youtube.py)
This commit is contained in:
parent
2794d7235b
commit
15fc5f7124
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue