use UserError instead of ValueError
This commit is contained in:
parent
2d0df1b37a
commit
fec392699b
2 changed files with 4 additions and 2 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
|
||||
from weboob.browser import PagesBrowser, URL
|
||||
from weboob.capabilities.base import UserError
|
||||
|
||||
from .pages.index import IndexPage
|
||||
from .pages.video import VideoPage
|
||||
|
|
@ -45,7 +46,7 @@ class YoujizzBrowser(PagesBrowser):
|
|||
|
||||
def search_videos(self, pattern):
|
||||
if len(pattern) < 3:
|
||||
raise ValueError('Pattern to short (min length : 3 characters)')
|
||||
raise UserError('Pattern to short (min length : 3 characters)')
|
||||
|
||||
self.search.go(pattern=pattern, pagenum=1)
|
||||
assert self.search.is_here(pattern=pattern, pagenum=1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue