Show a "failed to load results" error when a video_id search returns no results
(youtube.py)
This commit is contained in:
parent
627b8b6d5a
commit
65db982f1f
1 changed files with 5 additions and 1 deletions
|
@ -114,7 +114,11 @@ class Module(ModuleManager.BaseModule):
|
|||
else:
|
||||
raise utils.EventsResultsError()
|
||||
if video_id:
|
||||
event["stdout"].write(self.video_details(video_id))
|
||||
details = self.video_details(video_id)
|
||||
if details:
|
||||
event["stdout"].write(self.video_details(video_id))
|
||||
else:
|
||||
raise utils.EventResultsError()
|
||||
else:
|
||||
event["stderr"].write("No search phrase provided")
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue