fixes when no backends are loaded
This commit is contained in:
parent
11e7d2e3c1
commit
f4f9ef25f4
2 changed files with 16 additions and 6 deletions
|
|
@ -224,6 +224,13 @@ class Videoob(ReplApplication):
|
|||
|
||||
If PATTERN is not given, this command will search for the latest videos.
|
||||
"""
|
||||
if len(self.enabled_backends) == 0:
|
||||
if self.interactive:
|
||||
print 'No backend loaded. Please use the "backends" command.'
|
||||
else:
|
||||
print 'No backend loaded.'
|
||||
return 1
|
||||
|
||||
self.set_formatter_header(u'Search pattern: %s' % pattern if pattern else u'Latest videos')
|
||||
self.videos = []
|
||||
for backend, video in self.do('iter_search_results', pattern=pattern, nsfw=self.options.nsfw,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue