Addon Manager: Ensure cache is rebuilt after firstrun dialog

This commit is contained in:
Chris Hennes
2021-12-31 20:19:52 -06:00
parent 024e404a0e
commit 70c9804fc0
2 changed files with 9 additions and 3 deletions

View File

@@ -198,7 +198,10 @@ class Macro(object):
return
response = ""
block = 8192
while data := u2.read(block):
while True:
data = u2.read(block)
if not data:
break
if isinstance(data, bytes):
data = data.decode("utf-8")
response += data
@@ -232,7 +235,7 @@ class Macro(object):
FreeCAD.Console.PrintWarning(
translate(
"AddonsInstaller",
"Unable to retrieve a description for this macro.",
f"Unable to retrieve a description from the wiki for macro {self.name}",
)
+ "\n"
)