From 18d1f50f264f05e6049d1ea4cb7dab27aed7caae Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Sat, 27 Jun 2015 22:10:43 +0200 Subject: [PATCH] [qcookboob] fix bug when thumbnail_url is empty --- weboob/applications/qcookboob/recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weboob/applications/qcookboob/recipe.py b/weboob/applications/qcookboob/recipe.py index 671eab81..9d92ec0e 100644 --- a/weboob/applications/qcookboob/recipe.py +++ b/weboob/applications/qcookboob/recipe.py @@ -85,7 +85,7 @@ class Recipe(QFrame): self.ui.verticalLayout_2.setAlignment(Qt.AlignTop) def gotThumbnail(self): - if not empty(self.recipe.picture_url): + if self.recipe.picture_url and not empty(self.recipe.picture_url): data = urllib.urlopen(self.recipe.picture_url).read() img = QImage.fromData(data) self.ui.imageLabel.setPixmap(QPixmap.fromImage(img).scaledToWidth(250, Qt.SmoothTransformation))