repositories: Catch the proper exception for missing icon
This commit is contained in:
parent
e7b6db5434
commit
a4162e46e6
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ from contextlib import closing
|
|||
from compileall import compile_dir
|
||||
from io import BytesIO
|
||||
|
||||
from weboob.tools.exceptions import BrowserHTTPError
|
||||
from weboob.tools.exceptions import BrowserHTTPError, BrowserHTTPNotFound
|
||||
from .modules import Module
|
||||
from weboob.tools.log import getLogger
|
||||
from weboob.tools.misc import to_unicode
|
||||
|
|
@ -529,7 +529,7 @@ class Repositories(object):
|
|||
|
||||
try:
|
||||
icon = self.browser.open(icon_url)
|
||||
except BrowserHTTPError:
|
||||
except BrowserHTTPNotFound:
|
||||
pass # no icon, no problem
|
||||
else:
|
||||
with open(dest_path, 'wb') as fp:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue