Remove duplicate code

This commit is contained in:
Syres916
2020-09-09 10:12:56 +01:00
committed by Yorik van Havre
parent dee22fab86
commit f20eaf4aa9

View File

@@ -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):