repositories: Catch the proper exception for missing icon

This commit is contained in:
Laurent Bachelier 2014-09-03 20:43:41 +02:00 committed by Florent
commit a4162e46e6

View file

@ -31,7 +31,7 @@ from contextlib import closing
from compileall import compile_dir from compileall import compile_dir
from io import BytesIO from io import BytesIO
from weboob.tools.exceptions import BrowserHTTPError from weboob.tools.exceptions import BrowserHTTPError, BrowserHTTPNotFound
from .modules import Module from .modules import Module
from weboob.tools.log import getLogger from weboob.tools.log import getLogger
from weboob.tools.misc import to_unicode from weboob.tools.misc import to_unicode
@ -529,7 +529,7 @@ class Repositories(object):
try: try:
icon = self.browser.open(icon_url) icon = self.browser.open(icon_url)
except BrowserHTTPError: except BrowserHTTPNotFound:
pass # no icon, no problem pass # no icon, no problem
else: else:
with open(dest_path, 'wb') as fp: with open(dest_path, 'wb') as fp: