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:
|
else:
|
||||||
raise utils.EventsResultsError()
|
raise utils.EventsResultsError()
|
||||||
if video_id:
|
if video_id:
|
||||||
|
details = self.video_details(video_id)
|
||||||
|
if details:
|
||||||
event["stdout"].write(self.video_details(video_id))
|
event["stdout"].write(self.video_details(video_id))
|
||||||
|
else:
|
||||||
|
raise utils.EventResultsError()
|
||||||
else:
|
else:
|
||||||
event["stderr"].write("No search phrase provided")
|
event["stderr"].write("No search phrase provided")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue