From f20eaf4aa93ab0a86df20dbcecbe8f7fbfe3810e Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Wed, 9 Sep 2020 10:12:56 +0100 Subject: [PATCH] Remove duplicate code --- src/Mod/AddonManager/addonmanager_workers.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Mod/AddonManager/addonmanager_workers.py b/src/Mod/AddonManager/addonmanager_workers.py index f3dfead0b0..4113fbdafe 100644 --- a/src/Mod/AddonManager/addonmanager_workers.py +++ b/src/Mod/AddonManager/addonmanager_workers.py @@ -304,11 +304,9 @@ class FillMacroListWorker(QtCore.QThread): self.info_label_signal.emit("Downloading list of macros from the FreeCAD wiki...") self.progressbar_show.emit(True) u = utils.urlopen("https://www.freecadweb.org/wiki/Macros_recipes") - if u is None: + if not u: FreeCAD.Console.PrintWarning(translate('AddonsInstaller', 'Appears to be an issue connecting to the Wiki, therefore cannot retrieve Wiki macro list at this time')+"\n") return - if not u: - return p = u.read() u.close() if sys.version_info.major >= 3 and isinstance(p, bytes):