mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Ensure printers length is larger than 0 before accessing index
This commit is contained in:
parent
0028ec6746
commit
76d0b5f198
1 changed files with 4 additions and 3 deletions
|
@ -245,6 +245,7 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
|
|||
previous = {p.key: p for p in self._printers} # type: Dict[str, PrinterOutputModel]
|
||||
received = {p.uuid: p for p in printers} # type: Dict[str, CloudClusterPrinterStatus]
|
||||
|
||||
if len(printers) > 0:
|
||||
# We need the machine type of the host (1st list entry) to allow discovery to work.
|
||||
self._host_machine_type = printers[0].machine_variant
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue