finaly handle BrowserHTTPNotFound in backend browsers
This commit is contained in:
parent
a7b42940b0
commit
8d49950813
15 changed files with 78 additions and 50 deletions
|
|
@ -26,7 +26,6 @@ from PyQt4.QtGui import QApplication, QCompleter
|
|||
from weboob.capabilities.recipe import ICapRecipe
|
||||
from weboob.tools.application.qt import QtMainWindow, QtDo
|
||||
from weboob.tools.application.qt.backendcfg import BackendCfg
|
||||
from weboob.tools.browser import BrowserHTTPNotFound, BrokenPageError
|
||||
|
||||
from weboob.applications.qcookboob.ui.main_window_ui import Ui_MainWindow
|
||||
|
||||
|
|
@ -202,10 +201,7 @@ class MainWindow(QtMainWindow):
|
|||
backend_name = None
|
||||
for backend in self.weboob.iter_backends():
|
||||
if (backend_name and backend.name == backend_name) or not backend_name:
|
||||
try:
|
||||
recipe = backend.get_recipe(id)
|
||||
except (BrowserHTTPNotFound, BrokenPageError):
|
||||
recipe = None
|
||||
recipe = backend.get_recipe(id)
|
||||
if recipe:
|
||||
self.doAction('Details of recipe "%s"' % recipe.title, self.displayRecipe, [recipe, backend])
|
||||
QApplication.restoreOverrideCursor()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue