Show a "failed to load results" error when a video_id search returns no results

(youtube.py)
This commit is contained in:
jesopo 2019-01-21 19:30:39 +00:00
parent 627b8b6d5a
commit 65db982f1f

View file

@ -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: