🐛 Fix firmware info inclusion in systeminfo.txt

Backported from #4313
This commit is contained in:
Gina Häußge committed 2021-11-15 16:08:54 +01:00
1 parent 42f154c01c
commit 1d29d718ba
1 file changed
+4 -4
+4 -4
View File
@@ -69,10 +69,6 @@ def get_systeminfo(
def get_systeminfo_bundle(systeminfo, logbase, printer=None, plugin_manager=None):
from octoprint.util import to_bytes
systeminfotxt = []
for k in sorted(systeminfo.keys()):
systeminfotxt.append("{}: {}".format(k, systeminfo[k]))
terminaltxt = None
if printer and printer.is_operational():
firmware_info = printer.firmware_info
@@ -93,6 +89,10 @@ def get_systeminfo_bundle(systeminfo, logbase, printer=None, plugin_manager=None
z = zipstream.ZipFile()
# add systeminfo
systeminfotxt = []
for k in sorted(systeminfo.keys()):
systeminfotxt.append("{}: {}".format(k, systeminfo[k]))
z.writestr(
"systeminfo.txt", to_bytes("\n".join(systeminfotxt)), compress_type=compress_type
)